Bläddra i källkod

add long page controller

ming 3 år sedan
förälder
incheckning
d8c3a2a2da
1 ändrade filer med 10 tillägg och 0 borttagningar
  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: