feat(api): optional auth for public search and studio week. Refs EventHub/EventHubFront#58
This commit is contained in:
@@ -74,7 +74,7 @@ handle(Req, _Opts) ->
|
||||
%% @doc GET /v1/search — полнотекстовый поиск с фильтрами.
|
||||
-spec search(cowboy_req:req()) -> {ok, binary(), cowboy_req:req()}.
|
||||
search(Req) ->
|
||||
case handler_utils:auth_user(Req) of
|
||||
case handler_utils:auth_user_optional(Req) of
|
||||
{ok, UserId, Req1} ->
|
||||
Qs = cowboy_req:parse_qs(Req1),
|
||||
Type = proplists:get_value(<<"type">>, Qs, undefined),
|
||||
|
||||
Reference in New Issue
Block a user