mod auth
This commit is contained in:
parent
a5fb7e1b65
commit
e4c1823799
|
|
@ -202,13 +202,11 @@ class AuthsTable:
|
||||||
except Exception:
|
except Exception:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
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) -> bool:
|
||||||
try:
|
try:
|
||||||
with get_db() as db:
|
with get_db() as db:
|
||||||
result = db.query(Auth).filter_by(id=id).update({
|
result = db.query(Auth).filter_by(id=id).update({
|
||||||
"name": name,
|
"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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue