This commit is contained in:
1 parent
7280c5dd07
commit
b4f9c911fe
1 file changed
+3
-3
@@ -26,7 +26,7 @@ async def change_password_handler(client, userdata, msg, data):
|
|||||||
user = session.exec(statement).first()
|
user = session.exec(statement).first()
|
||||||
|
|
||||||
if user is None:
|
if user is None:
|
||||||
client.publish(f"loon/auth/register/{uuid}/response",
|
client.publish(f"loon/auth/change_password/{uuid}/response",
|
||||||
json.dumps({"success": False, "error": "The user is not registered!"}))
|
json.dumps({"success": False, "error": "The user is not registered!"}))
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -39,9 +39,9 @@ async def change_password_handler(client, userdata, msg, data):
|
|||||||
session.commit()
|
session.commit()
|
||||||
except IntegrityError:
|
except IntegrityError:
|
||||||
session.rollback()
|
session.rollback()
|
||||||
client.publish(f"loon/auth/register/{uuid}/response",
|
client.publish(f"loon/auth/change_password/{uuid}/response",
|
||||||
json.dumps({"success": False, "error": "The user is not registered!"}))
|
json.dumps({"success": False, "error": "The user is not registered!"}))
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
client.publish(f"loon/auth/register/{uuid}/response", json.dumps({"success": True, "error": None}))
|
client.publish(f"loon/auth/change_password/{uuid}/response", json.dumps({"success": True, "error": None}))
|
||||||
Reference in new issue
Block a user