Fix missing await on _get for stories route
This commit is contained in:
+1
-1
@@ -343,7 +343,7 @@ async def list_stories(user: User = Depends(require_auth)) -> JSONResponse:
|
|||||||
|
|
||||||
@app.get("/stories/{slug:path}")
|
@app.get("/stories/{slug:path}")
|
||||||
async def get_story(slug: str, user: User = Depends(require_auth)) -> JSONResponse:
|
async def get_story(slug: str, user: User = Depends(require_auth)) -> JSONResponse:
|
||||||
return _get(slug, stories_dir)
|
return await _get(slug, stories_dir)
|
||||||
|
|
||||||
@app.post("/stories/{slug:path}")
|
@app.post("/stories/{slug:path}")
|
||||||
async def save_story(slug: str, body: PageBody, user: User = Depends(require_auth)) -> JSONResponse:
|
async def save_story(slug: str, body: PageBody, user: User = Depends(require_auth)) -> JSONResponse:
|
||||||
|
|||||||
Reference in New Issue
Block a user