./ct_report/coverage/mongoose_graphql_user_auth_info.COVER.html
1 | -module(mongoose_graphql_user_auth_info). |
|
2 | -behaviour(mongoose_graphql). |
|
3 |
|
|
4 | -export([execute/4]). |
|
5 |
|
|
6 | -ignore_xref([execute/4]). |
|
7 |
|
|
8 | execute(#{authorized := Authorized}, user, <<"authStatus">>, _Args) -> |
|
9 | :-( |
case Authorized of |
10 | true -> |
|
11 | :-( |
{ok, 'AUTHORIZED'}; |
12 | false -> |
|
13 | :-( |
{ok, 'UNAUTHORIZED'} |
14 | end; |
|
15 | execute(Ctx, user, <<"username">>, _Args) -> |
|
16 | :-( |
case maps:get(user, Ctx, null) of |
17 | :-( |
null -> {ok, null}; |
18 | :-( |
User -> {ok, jid:to_binary(User)} |
19 | end. |
|
Line | Hits | Source |
---|