File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 17
17
18
18
"""root.py"""
19
19
20
+ import pathlib
20
21
from typing import Final
21
22
23
+ import aiofiles
22
24
import asfquart .session
23
25
import htpy
24
26
import quart .wrappers .response as response
25
27
import sqlalchemy .orm as orm
26
28
import sqlmodel
27
29
30
+ import atr .config as config
28
31
import atr .db as db
29
32
import atr .models .sql as sql
30
33
import atr .route as route
@@ -145,6 +148,14 @@ def sort_key(item: dict) -> str:
145
148
return await template .render ("index-public.html" )
146
149
147
150
151
+ @route .public ("/miscellaneous/resolved.json" )
152
+ async def resolved_json (session : route .CommitterSession | None ) -> response .Response :
153
+ json_path = pathlib .Path (config .get ().PROJECT_ROOT ) / "atr" / "static" / "json" / "resolved.json"
154
+ async with aiofiles .open (json_path ) as f :
155
+ content = await f .read ()
156
+ return response .Response (content , mimetype = "application/json" )
157
+
158
+
148
159
@route .public ("/policies" )
149
160
async def policies (session : route .CommitterSession | None ) -> str :
150
161
return await template .blank ("Policies" , content = _POLICIES )
You can’t perform that action at this time.
0 commit comments