Fix missing await on async _get in route handlers
This commit is contained in:
+1
-1
@@ -314,7 +314,7 @@ async def list_pages(user: User = Depends(require_auth)) -> JSONResponse:
|
|||||||
|
|
||||||
@app.get("/pages/{slug:path}")
|
@app.get("/pages/{slug:path}")
|
||||||
async def get_page(slug: str, user: User = Depends(require_auth)) -> JSONResponse:
|
async def get_page(slug: str, user: User = Depends(require_auth)) -> JSONResponse:
|
||||||
return _get(slug, pages_dir)
|
return await _get(slug, pages_dir)
|
||||||
|
|
||||||
@app.post("/pages/{slug:path}")
|
@app.post("/pages/{slug:path}")
|
||||||
async def save_page(slug: str, body: PageBody, user: User = Depends(require_auth)) -> JSONResponse:
|
async def save_page(slug: str, body: PageBody, user: User = Depends(require_auth)) -> JSONResponse:
|
||||||
|
|||||||
Reference in New Issue
Block a user