Skip to content

Commit 19c29f7

Browse files
mbuechsegerbsen
andauthored
Let compliance monitor redirect from / to /page/table (#1191)
Including a suggestion by @gerbsen. Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud> Co-authored-by: gerbsen <1186245+gerbsen@users.noreply.github.com>
1 parent a253763 commit 19c29f7

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

compliance-monitor/monitor.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,7 @@ def check_role(account: Optional[tuple[str, str]], subject: str = None, roles: i
389389

390390
@app.get("/")
391391
async def root():
392-
# we might use the following redirect in the future:
393-
# return RedirectResponse("/pages")
394-
# but keep this silly message for the time being, so as not to expose the work in progress too much
395-
return {"message": "Hello World"}
392+
return RedirectResponse(f"{settings.base_url}page/table")
396393

397394

398395
@app.get("/reports")
@@ -777,14 +774,6 @@ async def get_scope(
777774
return render_view(VIEW_SCOPE, view_type, spec=spec, relevant=relevant, rows=rows, base_url=settings.base_url, title=spec['name'])
778775

779776

780-
@app.get("/pages")
781-
async def get_pages(
782-
request: Request,
783-
conn: Annotated[connection, Depends(get_conn)],
784-
):
785-
return RedirectResponse("/page/table")
786-
787-
788777
@app.get("/results")
789778
async def get_results(
790779
request: Request,

0 commit comments

Comments
 (0)