Skip to content

Commit 3caf72e

Browse files
Merge branch 'master' into 0.4.0
2 parents a769f75 + 0c1f760 commit 3caf72e

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
* Administration section BugFix getting index file.
4646
* Adjust default auth routes
4747

48+
## 0.3.1 (2022-02-04)
49+
50+
* Administration section BugFix getting index file.
51+
4852
## 0.4.0 (2022-02-16)
4953

5054
* Add authorization rules to administration section.

minos/api_gateway/rest/backend/admin/main.727c29f160d3bc80.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

minos/api_gateway/rest/service.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ async def create_application(self) -> web.Application:
7777
app.router.add_route("DELETE", "/admin/autz-rules/{id}", AdminHandler.delete_autz_rule)
7878

7979
# Administration routes
80-
path = Path(Path.cwd())
81-
aiohttp_jinja2.setup(app, loader=jinja2.FileSystemLoader(f"{path}/minos/api_gateway/rest/backend/templates"))
80+
path = Path(__file__).parent
81+
aiohttp_jinja2.setup(app, loader=jinja2.FileSystemLoader(f"{path}/backend/templates"))
8282
app.router.add_route("*", "/administration{path:.*}", self.handler)
8383
# app.router.add_route("GET", "/administration/{filename:.*}", self._serve_files)
8484

@@ -100,10 +100,9 @@ async def create_database(self):
100100
@aiohttp_jinja2.template("tmpl.jinja2")
101101
async def handler(self, request): # pragma: no cover
102102
try:
103-
path = Path(Path.cwd())
104-
self._directory = path.resolve()
103+
path = Path(__file__).parent
105104
filename = Path(request.match_info["path"].replace("/", "", 1))
106-
filepath = self._directory.joinpath("minos", "api_gateway", "rest", "backend", "admin", filename).resolve()
105+
filepath = path.joinpath("backend", "admin", filename).resolve()
107106

108107
if filepath.is_file():
109108
return await self._get_file(filepath)

0 commit comments

Comments
 (0)