mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
Stefano Pigozzi
e90221d1b6
forse ho implementato la scopa https://www.youtube.com/watch?v=NFclBewnVmY
15 lines
554 B
Python
15 lines
554 B
Python
from starlette.requests import Request
|
|
from starlette.responses import *
|
|
from royalnet.constellation import *
|
|
from royalnet.utils import *
|
|
from royalnet.backpack.tables import *
|
|
from ..tables import *
|
|
|
|
|
|
class ApiUserListStar(PageStar):
|
|
path = "/api/wiki/list"
|
|
|
|
async def page(self, request: Request) -> JSONResponse:
|
|
async with self.alchemy.session_acm() as session:
|
|
pages: typing.List[WikiPage] = await asyncify(session.query(self.alchemy.get(WikiPage)).all)
|
|
return JSONResponse([page.json_list() for page in pages])
|