Commit graph

16 commits

Author SHA1 Message Date
Benjamin Neff
4b49270be7
Simplify comment and post validation
It's enough to check if the comment exists on the specified post, if it
doesn't exist at all, that check will also fail.

Also do that check directly on SQL level and just check if the comment
exist instead of looping through all comments.
2024-06-05 00:14:31 +02:00
Jonne Haß
1e1130e211 add API routes for comment likes 2023-11-24 18:12:59 +01:00
flaburgan
8d6548b610
Introduce like-interactions.js
Adapt to latest development

User likes
 Set css class for inline likes on comment

Re-set participation on comment likes

Co-authored-by: Thorsten Claus <ThorstenClaus@web.de>
2023-11-13 02:26:59 +01:00
Jonne Haß
0754c92116 API: correct like and comment scopes for private posts 2020-02-02 18:23:34 +01:00
Jonne Haß
6bbcb7415b API: don't make error messages translatable 2020-02-02 18:04:11 +01:00
Jonne Haß
04744b4dac API: Return 409 when trying to create something existing and 410 when trying to delete something already gone
Probably missed a few more cases where we always return sucess when the user requests
status quo, but this should cover most ground
2020-02-02 18:04:11 +01:00
Jonne Haß
e8b9a70fbf Ensure API responses adhere to documented error format 2020-02-02 18:04:11 +01:00
Jonne Haß
dad54db7f4 Return API pagination links as headers rather than in the response body itself 2020-01-21 23:34:43 +01:00
Hank Grabowski
f07912ebdd API Branch Final Cleanup Before PR 2018-12-30 11:50:58 -05:00
Hank Grabowski
a8d69c48dc OpenID Scopes and Security updates 2018-12-26 14:13:13 -05:00
Hank Grabowski
7109773b83 API Paging library and used in appropriate controllers with full tests 2018-12-17 22:07:33 -05:00
Hank Grabowski
d6915ff5d0 Likes API endpoint complete 2018-11-01 11:06:45 -04:00
Frank Rousseau
2c94994f32 Fix code style 2018-11-01 13:56:18 +01:00
Frank Rousseau
348790292b Make API likes controller match specs 2018-11-01 13:56:18 +01:00
Frank Rousseau
797afb1c9b Changes to use V1 API version instead of V0 2018-11-01 13:56:18 +01:00
Frank Rousseau
100b1a4286 Move API controllers from v0 to v1 2018-11-01 13:56:18 +01:00
Renamed from app/controllers/api/v0/likes_controller.rb (Browse further)