feat(api): optional auth for public search and studio week. Refs EventHub/EventHubFront#58
This commit is contained in:
@@ -225,7 +225,7 @@ create_event(Req) ->
|
||||
%% @doc GET /v1/calendars/:calendar_id/events — список событий.
|
||||
-spec list_events(cowboy_req:req()) -> {ok, binary(), cowboy_req:req()}.
|
||||
list_events(Req) ->
|
||||
case handler_utils:auth_user(Req) of
|
||||
case handler_utils:auth_user_optional(Req) of
|
||||
{ok, UserId, Req1} ->
|
||||
CalendarId = cowboy_req:binding(calendar_id, Req1),
|
||||
Qs = cowboy_req:parse_qs(Req1),
|
||||
|
||||
Reference in New Issue
Block a user