get user method

This commit is contained in:
grey-cat-1908 2024-08-23 06:57:42 +00:00
parent af5b759c16
commit d36af3ad73

View file

@ -36,6 +36,11 @@ async def login(auth: models.Auth) -> models.Token:
) )
@router.post("/get")
async def get(user: User) -> models.User:
return models.User(id=user.id, username=user.username)
@router.put("/update/password") @router.put("/update/password")
async def update_password(user: User, new: models.UpdatePassword): async def update_password(user: User, new: models.UpdatePassword):
if len(new.password.strip()) == 0: if len(new.password.strip()) == 0: