kassa added
This commit is contained in:
32
main.py
32
main.py
@ -3,14 +3,15 @@ from fastapi.middleware import Middleware
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from kv import kv
|
||||
from auth import auth
|
||||
from kassa import kassa
|
||||
import uvicorn
|
||||
|
||||
middleware = [Middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins = ['*'],
|
||||
allow_credentials = True,
|
||||
allow_methods = ['*'],
|
||||
allow_headers = ['*'],
|
||||
allow_origins=['*'],
|
||||
allow_credentials=True,
|
||||
allow_methods=['*'],
|
||||
allow_headers=['*'],
|
||||
)]
|
||||
|
||||
app = FastAPI(middleware=middleware)
|
||||
@ -18,15 +19,26 @@ app = FastAPI(middleware=middleware)
|
||||
|
||||
@app.get('/hello')
|
||||
async def say_hello():
|
||||
return { "text": "Hello!" }
|
||||
return {"text": "Hello!"}
|
||||
|
||||
app.include_router(
|
||||
router = auth.router,
|
||||
prefix= '/auth',
|
||||
router=auth.router,
|
||||
prefix='/auth',
|
||||
tags=['Авторизация'],
|
||||
responses={404: {"description": "Not found"}}
|
||||
)
|
||||
app.include_router(
|
||||
router=kv.router,
|
||||
prefix='/kv',
|
||||
tags=['Кварплата'],
|
||||
responses={404: {"description": "Not found"}}
|
||||
)
|
||||
app.include_router(
|
||||
router=kassa.router,
|
||||
prefix='/kassa',
|
||||
tags=['Касса Атол'],
|
||||
responses={404: {"description": "Not found"}}
|
||||
)
|
||||
app.include_router(router = kv.router, prefix = '/kv',tags=['Кварплата'], responses={404: {"description": "Not found"}})
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
uvicorn.run("main:app", host = "0.0.0.0", port = 5000)
|
||||
uvicorn.run("main:app", host="0.0.0.0", port=5000)
|
||||
|
Reference in New Issue
Block a user