Uprava struktury letu a fotky, uprava GPS pozic v DB

This commit is contained in:
Michal Kváček
2023-07-03 13:23:59 +02:00
parent ba5c3b6a49
commit f8245492b9
18 changed files with 277 additions and 77 deletions
-17
View File
@@ -1,17 +0,0 @@
from sqlalchemy import select, desc
from database.models import Flight
from endpoints.base import BaseEndpoint
class FlightsEndpoint(BaseEndpoint):
async def resolve(self):
self.db.add(Flight(name="test"))
await self.db.flush()
data = await self.db.execute(select(Flight).order_by(desc(Flight.id)))
model = data.scalars().first()
return {
"status": model
}