mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Sort wikipages by name
This commit is contained in:
parent
174e682ebe
commit
c833723bbd
3 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "royalpack"
|
name = "royalpack"
|
||||||
version = "5.5.3"
|
version = "5.5.4"
|
||||||
description = "A Royalnet command pack for the Royal Games community"
|
description = "A Royalnet command pack for the Royal Games community"
|
||||||
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
|
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
|
||||||
license = "AGPL-3.0+"
|
license = "AGPL-3.0+"
|
||||||
|
|
|
@ -10,6 +10,6 @@ from royalnet.constellation.api import *
|
||||||
class ApiWikiListStar(ApiStar):
|
class ApiWikiListStar(ApiStar):
|
||||||
path = "/api/wiki/list/v1"
|
path = "/api/wiki/list/v1"
|
||||||
|
|
||||||
async def api(self, data: ApiData) -> dict:
|
async def api(self, data: ApiData) -> JSON:
|
||||||
pages: typing.List[WikiPage] = await asyncify(data.session.query(self.alchemy.get(WikiPage)).all)
|
pages: typing.List[WikiPage] = await asyncify(data.session.query(self.alchemy.get(WikiPage)).all)
|
||||||
return [page.json_list() for page in pages]
|
return [page.json_list() for page in sorted(pages, key=lambda p: p.title)]
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
semantic = "5.5.3"
|
semantic = "5.5.4"
|
||||||
|
|
Loading…
Reference in a new issue