commit a4d31d578af06d2ab3b4732dbf61d9b04a9fd19c
parent 9e1846ffe02ef6dbec37231914654960c08dd0e2
Author: srfsh <dev@srf.sh>
Date: Thu, 25 Aug 2022 12:42:47 +0300
Zenflows.GQL.MW.Sign: fix match
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/zenflows/gql/mw/sign.ex b/src/zenflows/gql/mw/sign.ex
@@ -29,7 +29,7 @@ alias Zenflows.VF.Person
def call(res, _opts) do
if res.context.authenticate_calls? do
with %{gql_user: user, gql_sign: sign, gql_body: body} <- res.context,
- per when not is_nil(per) <- Person.Domain.one(user: user),
+ {:ok, per} <- Person.Domain.one(user: user),
true <- Restroom.verify_graphql?(body, sign, per.eddsa_public_key) do
put_in(res.context[:req_user], per)
else _ ->