Fix login errors, add get /users and get /user (username or id) routes.
This commit is contained in:
parent
97afe5447a
commit
fbf731acb6
5 changed files with 59 additions and 24 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from sqlmodel import Field, SQLModel
|
||||
|
||||
|
||||
class User(SQLModel, table=True):
|
||||
class User(SQLModel):
|
||||
id: int | None = Field(default=None, primary_key=True)
|
||||
|
||||
username: str
|
||||
|
|
@ -13,5 +13,5 @@ class UserIn(User):
|
|||
password: str
|
||||
|
||||
|
||||
class UserInDB(User):
|
||||
class UserInDB(User, table=True):
|
||||
hashed_password: str
|
||||
|
|
|
|||
Loading…
Reference in a new issue