Browse Source

add long page controller

ming 3 years ago
parent
commit
d8c3a2a2da
1 changed files with 10 additions and 0 deletions
  1. 10 0
      api/main.py

+ 10 - 0
api/main.py

@@ -102,6 +102,16 @@ async def get_home_page(request: Request, response: Response, Authorize: AuthJWT
     current_user = Authorize.get_jwt_subject()
     return templates.TemplateResponse("make_video.html", {"request": request, "response": response})
 
+@app.get("/make_video_long", response_class=HTMLResponse)
+async def get_home_page(request: Request, response: Response, Authorize: AuthJWT = Depends()):
+    try:
+        Authorize.jwt_required()
+    except Exception as e:
+        print(e)
+        return '請先登入帳號'
+    current_user = Authorize.get_jwt_subject()
+    return templates.TemplateResponse("make_video_long.html", {"request": request, "response": response})
+
 @app.get("/make_video_slide", response_class=HTMLResponse)
 async def make_video_slide(request: Request, response: Response, Authorize: AuthJWT = Depends()):
     try: