Ihorog commited on
Commit
071d1e4
·
verified ·
1 Parent(s): d418ed5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -24
app.py CHANGED
@@ -1,12 +1,4 @@
1
- з fastapi імпорт FastAPI, Запит
2
- з ci_trigger_engine імпортувати trigger_engine
3
- з ci_sync_monitor імпорту sync_monitor
4
-
5
- додаток = ШвидкийAPI()
6
- входи = []
7
-
8
- @app.post( "/входи" )
9
- асинхронне # app.py
10
  from fastapi import FastAPI, Request
11
  from fastapi.responses import RedirectResponse, JSONResponse
12
 
@@ -56,18 +48,4 @@ async def receive_input(req: Request):
56
  @app.get("/входи")
57
  @app.get("/inputs")
58
  async def get_all():
59
- return inputs_store receive_input ( req: Запит ):
60
- дані = очікувати req.json()
61
- inputs.append(дані)
62
- trigger_engine.add_input(дані)
63
- sync_monitor.log_event(дані)
64
- sync_monitor.check_alignment(дані)
65
- повернути { "статус" : "отримано" }
66
-
67
- @app.get( "/входи" )
68
- асинхронний def get_all ():
69
- повернення входів
70
-
71
- @app.get( "/здоров'я" )
72
- def перевірка_справності ():
73
- повернути { "статус" : "ок" }
 
1
+ # app.py
 
 
 
 
 
 
 
 
2
  from fastapi import FastAPI, Request
3
  from fastapi.responses import RedirectResponse, JSONResponse
4
 
 
48
  @app.get("/входи")
49
  @app.get("/inputs")
50
  async def get_all():
51
+ return inputs_store