Outpost Community Demo

PATCH /topics/:id returns 200 but doesn't update the title

By Arjun M. ·

Using the API to update a topic title. The endpoint returns 200 with the topic object, but the title in the response is still the old title. Refreshing the page confirms it didn't actually change.

curl -X PATCH https://our-slug.outpost.ninja/api/community/our-slug/topics/abc123 \
  -H "Authorization: Bearer ..." \
  -H "Content-Type: application/json" \
  -d '{"title": "Updated Title"}'

Response body has the old title. PUT works fine though — is PATCH not fully implemented?

3 replies

priya.sh ·

I ran into this too last week! I just switched to PUT as a workaround but PATCH should work — it's documented.

top-outpost-ninja ·

Bug confirmed. The PATCH handler was reading the title from the existing record instead of the request body for the response. The update was actually happening in the database but the response was returning stale data, which also meant the frontend cache got the wrong value.

Fixed and deployed. PATCH now returns the correctly updated object.

Arjun M. ·

Confirmed working. The response now matches what I sent. Thanks!