mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 21:42:58 +00:00
fix: accidental indent during format changed logic
This commit is contained in:
parent
12287f8680
commit
150152ddbd
@ -117,23 +117,23 @@ async def signin(request: Request, form_data: SigninForm):
|
|||||||
else:
|
else:
|
||||||
user = Auths.authenticate_user(form_data.email.lower(), form_data.password)
|
user = Auths.authenticate_user(form_data.email.lower(), form_data.password)
|
||||||
|
|
||||||
if user:
|
if user:
|
||||||
token = create_token(
|
token = create_token(
|
||||||
data={"id": user.id},
|
data={"id": user.id},
|
||||||
expires_delta=parse_duration(request.app.state.JWT_EXPIRES_IN),
|
expires_delta=parse_duration(request.app.state.JWT_EXPIRES_IN),
|
||||||
)
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"token": token,
|
"token": token,
|
||||||
"token_type": "Bearer",
|
"token_type": "Bearer",
|
||||||
"id": user.id,
|
"id": user.id,
|
||||||
"email": user.email,
|
"email": user.email,
|
||||||
"name": user.name,
|
"name": user.name,
|
||||||
"role": user.role,
|
"role": user.role,
|
||||||
"profile_image_url": user.profile_image_url,
|
"profile_image_url": user.profile_image_url,
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
raise HTTPException(400, detail=ERROR_MESSAGES.INVALID_CRED)
|
raise HTTPException(400, detail=ERROR_MESSAGES.INVALID_CRED)
|
||||||
|
|
||||||
|
|
||||||
############################
|
############################
|
||||||
|
Loading…
Reference in New Issue
Block a user