починил авторизацию, ускорил систему с помощью сервера, сделал спрайты по правильному
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
from fastapi import FastAPI
|
||||
from functinos import authorization, recalculation_events_func, get_random_event_func
|
||||
from DB import UseDB
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/authorization")
|
||||
async def root(login: str, password: str):
|
||||
return authorization.authorization(login, password)
|
||||
|
||||
|
||||
@app.get("/create_new_game")
|
||||
async def root():
|
||||
return UseDB("game").create_new_game()
|
||||
|
||||
|
||||
@app.get("/recalculation_events")
|
||||
async def recalculation_events(difficulty: str, well: bool):
|
||||
return recalculation_events_func.recalculation_events_func(difficulty, well)
|
||||
|
||||
|
||||
@app.get("/get_random_event")
|
||||
async def get_random_event():
|
||||
return get_random_event_func.get_random_event_func()
|
||||
Reference in New Issue
Block a user