Fix /comment JSON response #167

Merged
Aevann merged 1 commits from :comment-json into master 2023-07-07 18:53:15 +00:00

Since replies is no longer added to the response, returning the JSON for the top level comment makes it impossible to get the JSON for a reply.

Btw - you might want to remove the author field here. It attaches the full user bio and badge list to every comment, which turns something like GET https://rdrama.net/post/18459 into a 21MB response. author_name is pretty much all anyone needs anyway

Since `replies` is no longer added to the response, returning the JSON for the top level comment makes it impossible to get the JSON for a reply. Btw - you might want to remove the `author` field [here](https://fsdfsd.net/rDrama/rDrama/src/commit/60b5b33a7932e8f4d29ca47364352540cf43566e/files/classes/comment.py#L308). It attaches the full user bio and badge list to every comment, which turns something like `GET https://rdrama.net/post/18459` into a 21MB response. `author_name` is pretty much all anyone needs anyway
float-trip added 1 commit 2023-07-06 16:09:07 +00:00

Any issues with merging this? To elaborate, the problem is:

GET https://rdrama.net/comment/4526754 -> returns only the JSON for 4526754

GET https://rdrama.net/comment/4526930 -> returns only the JSON for 4526754

Seems unlikely anyone's relying on this behavior. The only way to get the JSON for 4526930 currently is from /comments or /notifications.

Any issues with merging this? To elaborate, the problem is: `GET https://rdrama.net/comment/4526754` -> returns only the JSON for `4526754` `GET https://rdrama.net/comment/4526930` -> returns only the JSON for `4526754` Seems unlikely anyone's relying on this behavior. The only way to get the JSON for `4526930` currently is from `/comments` or `/notifications`.

no issues lol i was just busy

no issues lol i was just busy
Aevann merged commit 041481f2b6 into master 2023-07-07 18:53:15 +00:00

My bad, ty

My bad, ty
float-trip deleted branch comment-json 2023-07-07 18:59:08 +00:00

king i restored the replies field but made it return ids only instead of full json

king i restored the replies field but made it return ids only instead of full json

Awesome, thanks

Awesome, thanks
Sign in to join this conversation.
There is no content yet.