Little mistake in the API manual

Hi, on the update topic entry, there is what seems to be a little mistake in the path:
image

Should be: /t/{slug}/{id}.json I guess?

Is this something we can address @blake?

1 Like

Yes, it probably should say {slug}, but using a - or any random (but valid) character works because the rails router will just look it up by topic id if it doesn’t find the slug.

I’m pretty sure this syntax is used in more than one place because sometimes you just don’t know the slug so this is a hack work around.

I’ll look into changing this so that it says {slug} in all the right places and also document the - trick since it is handy. Pull-Requests are welcome though!

6 Likes

I updated the api docs for the update topic route so that the url includes the slug and added a little tip about using the - trick.

5 Likes