def reset(token):
try:
token = token.replace("*", ".")
tokenData = jwt.decode(str(token), utils.JWT_SECRET, algorithms=[utils.JWT_ALGORITHM])
accId = int(tokenData["userId"])
accData = accFunctions.getAccData(accId)
accData["authToken"] = accFunctions.genToken(accId)
return custResponse(200, "Resetting Account", accData)
except Exception as e:
if app.config["DEBUG"] == True:
print("*-*-*-*")
print(e)
return custResponse(400,{"Err": str(e)})
else:
return custResponse(400, "Error resetting account.")
评论列表
文章目录