mod auth
This commit is contained in:
parent
4aa9050292
commit
488d8b576e
|
|
@ -205,14 +205,11 @@ class AuthsTable:
|
||||||
def update_user_profile(self, id: str, name: str, profile_image_url: str, role: str) -> bool:
|
def update_user_profile(self, id: str, name: str, profile_image_url: str, role: str) -> bool:
|
||||||
try:
|
try:
|
||||||
with get_db() as db:
|
with get_db() as db:
|
||||||
result = (
|
result = db.query(Auth).filter_by(id=id).update({
|
||||||
db.query(Users)
|
"name": name,
|
||||||
.filter_by(id=id)
|
"profile_image_url": profile_image_url,
|
||||||
.update({
|
"role": role
|
||||||
"name": name,
|
})
|
||||||
"profile_image_url": profile_image_url,
|
|
||||||
"role": role})
|
|
||||||
)
|
|
||||||
db.commit()
|
db.commit()
|
||||||
return True if result == 1 else False
|
return True if result == 1 else False
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue