add token response
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
from models import User
|
from models import User, TokenResponse
|
||||||
from settings import settings
|
from settings import settings
|
||||||
from fastapi import HTTPException, status, Request
|
from fastapi import HTTPException, status, Request
|
||||||
import sqlite3
|
import sqlite3
|
||||||
@@ -101,4 +101,4 @@ def login(user: User) -> str:
|
|||||||
detail="Invalid credentials"
|
detail="Invalid credentials"
|
||||||
)
|
)
|
||||||
|
|
||||||
return security.sign_jwt(row)
|
return TokenResponse(token=security.sign_jwt(row))
|
||||||
|
|||||||
Reference in New Issue
Block a user