Started working on front pages

This commit is contained in:
Ben Arc
2021-04-13 19:20:12 +01:00
parent df5e4cb9db
commit 9cd3e00b83
9 changed files with 114 additions and 101 deletions
+11 -4
View File
@@ -14,9 +14,16 @@ async def index():
return await render_template("copilot/index.html", user=g.user)
@copilot_ext.route("/<copilot_id>")
async def display(copilot_id):
@copilot_ext.route("/cp/<copilot_id>")
async def compose(copilot_id):
copilot = await get_copilot(copilot_id) or abort(
HTTPStatus.NOT_FOUND, "Charge link does not exist."
HTTPStatus.NOT_FOUND, "Copilot link does not exist."
)
return await render_template("copilot/panel.html", copilot=copilot)
return await render_template("copilot/compose.html", copilot=copilot)
@copilot_ext.route("/<copilot_id>")
async def panel(copilot_id):
copilot = await get_copilot(copilot_id) or abort(
HTTPStatus.NOT_FOUND, "Copilot link does not exist."
)
return await render_template("copilot/panel.html", copilot=copilot)