1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-30 15:04:18 +00:00
royalnet/royalpack/stars/api_wiki_list.py

16 lines
514 B
Python
Raw Normal View History

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 *
2020-02-09 18:12:34 +00:00
from royalnet.constellation.api import *
2020-02-09 18:12:34 +00:00
class ApiWikiListStar(ApiData):
path = "/api/wiki/list/v1"
2020-02-09 18:12:34 +00:00
async def api(self, data: ApiData) -> dict:
pages: typing.List[WikiPage] = await asyncify(data.session.query(self.alchemy.get(WikiPage)).all)
return [page.json_list() for page in pages]