Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,9 +50,9 @@ def AgentI(request:Agent):
|
|
| 50 |
try:
|
| 51 |
velocitypayableinstance=VelocityPayableAgent()
|
| 52 |
velocitypayableinstance.Agentinit(request.agent_id)
|
| 53 |
-
return True
|
| 54 |
except Exception as e:
|
| 55 |
-
return False
|
| 56 |
|
| 57 |
|
| 58 |
|
|
@@ -61,14 +61,13 @@ def PaymentInstruction(request:Payment):
|
|
| 61 |
try:
|
| 62 |
velocitypayableinstance=VelocityPayableAgent()
|
| 63 |
output=velocitypayableinstance.Agent(request.instruction)
|
| 64 |
-
return output
|
| 65 |
|
| 66 |
except error:
|
| 67 |
-
return False
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
-
|
| 72 |
@app.get("/agent/{id}")
|
| 73 |
def getAgentKey(id):
|
| 74 |
pkey=load_keypair(id)
|
|
|
|
| 50 |
try:
|
| 51 |
velocitypayableinstance=VelocityPayableAgent()
|
| 52 |
velocitypayableinstance.Agentinit(request.agent_id)
|
| 53 |
+
return {"status":True}
|
| 54 |
except Exception as e:
|
| 55 |
+
return {"status":False}
|
| 56 |
|
| 57 |
|
| 58 |
|
|
|
|
| 61 |
try:
|
| 62 |
velocitypayableinstance=VelocityPayableAgent()
|
| 63 |
output=velocitypayableinstance.Agent(request.instruction)
|
| 64 |
+
return {"status":output}
|
| 65 |
|
| 66 |
except error:
|
| 67 |
+
return {"status":False}
|
| 68 |
|
| 69 |
|
| 70 |
|
|
|
|
| 71 |
@app.get("/agent/{id}")
|
| 72 |
def getAgentKey(id):
|
| 73 |
pkey=load_keypair(id)
|