feat: calendar follow API (POST/DELETE follow, GET following). Refs EventHub/EventHubFront#9
CI / test (push) Failing after 6m39s
CI / deploy-ift (push) Has been skipped
CI / e2e-ift (push) Has been skipped
CI / deploy-stage (push) Has been skipped
CI / e2e-stage (push) Has been skipped

This commit is contained in:
2026-07-20 22:10:48 +03:00
parent 4932f9abae
commit 59220b955e
16 changed files with 599 additions and 4 deletions
+3 -1
View File
@@ -114,7 +114,9 @@ get_calendar(Req) ->
CalendarId = cowboy_req:binding(id, Req1),
case logic_calendar:get_calendar(UserId, CalendarId) of
{ok, Calendar} ->
handler_utils:send_json(Req1, 200, handler_utils:calendar_to_json(Calendar));
Json0 = handler_utils:calendar_to_json(Calendar),
Following = logic_calendar_follow:is_following(UserId, CalendarId),
handler_utils:send_json(Req1, 200, Json0#{following => Following});
{error, access_denied} ->
handler_utils:send_error(Req1, 403, <<"Access denied">>);
{error, not_found} ->