Spaces:
Sleeping
Sleeping
rogerxavier
commited on
Commit
•
be46fd0
1
Parent(s):
ecc6c96
Update server/account_manager.py
Browse files- server/account_manager.py +15 -0
server/account_manager.py
CHANGED
@@ -39,6 +39,21 @@ async def sign_up(signUp: signUp):
|
|
39 |
|
40 |
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
|
44 |
@router.get("/purchase")
|
|
|
39 |
|
40 |
|
41 |
|
42 |
+
@router.get("/accountDelete")
|
43 |
+
@router.post("/accountDelete")
|
44 |
+
async def account_delete(accountDelete: accountDelete):
|
45 |
+
table_store = tableStore(ots_client=router.ots_client,table_name=router.table_name)
|
46 |
+
try:
|
47 |
+
delete_result = table_store.userDelete(accountDelete.email,accountDelete.password)
|
48 |
+
if delete_result['ec']==200:
|
49 |
+
return delete_result
|
50 |
+
else:
|
51 |
+
raise HTTPException(status_code=400, detail="account delete failed in table store")
|
52 |
+
except Exception as e:
|
53 |
+
raise HTTPException(status_code=400, detail="account delete failed")
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
|
58 |
|
59 |
@router.get("/purchase")
|