fix signIn

This commit is contained in:
knst-kotov
2021-10-24 17:13:32 +03:00
parent 2d74842d9a
commit 0d87f52d3a
2 changed files with 4 additions and 8 deletions

View File

@@ -66,12 +66,12 @@ async def login(_, info: GraphQLResolveInfo, email: str, password: str = ""):
auto_delete = False if device == "mobile" else True # why autodelete with mobile?
try:
user = Identity.identity(user_id=orm_user.id, password=password)
user = Identity.identity(orm_user, password)
except InvalidPassword:
return {"error" : "invalid password"}
token = await Authorize.authorize(user, device=device, auto_delete=auto_delete)
return {"token" : token, "user": user}
return {"token" : token, "user": orm_user}
@query.field("signOut")