./ct_report/coverage/mongoose_graphql_admin_query.COVER.html

1 -module(mongoose_graphql_admin_query).
2
3 -export([execute/4]).
4
5 -ignore_xref([execute/4]).
6
7 -include("../mongoose_graphql_types.hrl").
8
9 execute(_Ctx, _Obj, <<"domains">>, _Args) ->
10
:-(
{ok, admin};
11 execute(_Ctx, _Obj, <<"account">>, _Args) ->
12 13 {ok, account};
13 execute(_Ctx, _Obj, <<"muc_light">>, _Args) ->
14 13 {ok, muc_light};
15 execute(_Ctx, _Obj, <<"session">>, _Opts) ->
16 14 {ok, session};
17 execute(_Ctx, _Obj, <<"stanza">>, _Opts) ->
18
:-(
{ok, #{}};
19 execute(#{authorized := Authorized}, _Obj, <<"checkAuth">>, _Args) ->
20 3 case Authorized of
21 true ->
22 2 {ok, 'AUTHORIZED'};
23 false ->
24 1 {ok, 'UNAUTHORIZED'}
25 end.
Line Hits Source