mirror of
https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
synced 2024-11-23 23:41:06 +03:00
code styling
This commit is contained in:
parent
f539db5933
commit
838e30458d
@ -96,7 +96,7 @@ async def status(request: Request):
|
|||||||
|
|
||||||
@app.get('/-/origins')
|
@app.get('/-/origins')
|
||||||
async def _origins(request: Request):
|
async def _origins(request: Request):
|
||||||
session = sessionmaker(autocommit=False, autoflush=False, bind=db)()
|
session = sessionmaker(bind=db)()
|
||||||
response = list(map(lambda x: jsonable_encoder(x), session.query(Origin).all()))
|
response = list(map(lambda x: jsonable_encoder(x), session.query(Origin).all()))
|
||||||
session.close()
|
session.close()
|
||||||
return JSONResponse(response)
|
return JSONResponse(response)
|
||||||
@ -104,7 +104,7 @@ async def _origins(request: Request):
|
|||||||
|
|
||||||
@app.get('/-/leases')
|
@app.get('/-/leases')
|
||||||
async def _leases(request: Request):
|
async def _leases(request: Request):
|
||||||
session = sessionmaker(autocommit=False, autoflush=False, bind=db)()
|
session = sessionmaker(bind=db)()
|
||||||
response = list(map(lambda x: jsonable_encoder(x), session.query(Lease).all()))
|
response = list(map(lambda x: jsonable_encoder(x), session.query(Lease).all()))
|
||||||
session.close()
|
session.close()
|
||||||
return JSONResponse(response)
|
return JSONResponse(response)
|
||||||
|
Loading…
Reference in New Issue
Block a user