asv7j commited on
Commit
bc4835f
·
verified ·
1 Parent(s): a9a159b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py CHANGED
@@ -62,3 +62,21 @@ async def remove(op: Operation):
62
  return {"result": "Invalid category"}
63
  else:
64
  return {"result": "Invalid operation"}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  return {"result": "Invalid category"}
63
  else:
64
  return {"result": "Invalid operation"}
65
+
66
+
67
+ @app.post("/check/")
68
+ async def add(op: Operation):
69
+ if op.a == 'Check':
70
+ target_list = None
71
+ if op.b == 'Greet':
72
+ target_list = Greet
73
+ elif op.b == 'Bye':
74
+ target_list = Bye
75
+ elif op.b == 'Sleep':
76
+ target_list = Sleep
77
+ elif op.b == 'Care':
78
+ target_list = Care
79
+ if target_list is not None:
80
+ return {"result": target_list}
81
+ else:
82
+ return {"result": "Invalid operation"}