./ct_report/coverage/mongoose_graphql_gdpr_admin_query.COVER.html

1 -module(mongoose_graphql_gdpr_admin_query).
2 -behaviour(mongoose_graphql).
3
4 -export([execute/4]).
5
6 -import(mongoose_graphql_helper, [make_error/2]).
7
8 -ignore_xref([execute/4]).
9
10 -include("../mongoose_graphql_types.hrl").
11 -include("mongoose.hrl").
12 -include("jlib.hrl").
13
14 execute(_Ctx, gdpr, <<"retrievePersonalData">>, #{<<"username">> := User, <<"domain">> := Domain,
15 <<"resultFilepath">> := FilePath}) ->
16 37 case gdpr_api:retrieve_all(User, Domain, FilePath) of
17 25 ok -> {ok, "Data retrieved"};
18 12 Error -> make_error(Error, #{user => User, domain => Domain})
19 end.
Line Hits Source