fix(api): resolve public calendar GET by unique short_name.
CI / test (push) Successful in 7m28s
CI / deploy-ift (push) Successful in 2m46s
CI / e2e-ift (push) Successful in 1m26s
CI / deploy-stage (push) Successful in 2m4s
CI / e2e-stage (push) Successful in 2m4s

This commit is contained in:
2026-08-14 15:00:41 +03:00
parent 658cbda4fe
commit 3d7ae0d372
8 changed files with 67 additions and 18 deletions
+2 -1
View File
@@ -121,7 +121,8 @@ get_calendar(Req) ->
case logic_calendar:get_calendar(UserId, CalendarId) of
{ok, Calendar} ->
Json0 = handler_utils:calendar_to_json(Calendar),
Following = UserId =/= <<>> andalso logic_calendar_follow:is_following(UserId, CalendarId),
Following = UserId =/= <<>> andalso
logic_calendar_follow:is_following(UserId, Calendar#calendar.id),
handler_utils:send_json(Req1, 200, Json0#{following => Following});
{error, access_denied} ->
handler_utils:send_error(Req1, 403, <<"Access denied">>);