tomoya 7 månader sedan
förälder
incheckning
729ff994ff
1 ändrade filer med 7 tillägg och 7 borttagningar
  1. 7 7
      backend/app/app/api/api_v1/endpoints/videos.py

+ 7 - 7
backend/app/app/api/api_v1/endpoints/videos.py

@@ -22,7 +22,7 @@ BACKEND_ZIP_STORAGE = Path("/app").joinpath(settings.BACKEND_ZIP_STORAGE)
 LOCAL_ZIP_STORAGE = Path("/").joinpath(settings.LOCAL_ZIP_STORAGE)
 
 LINE_URL = 'https://notify-api.line.me/api/notify'
-LINE_TOKEN = '剛剛複製的權杖'
+LINE_TOKEN = 'o8dqdVL2k8aiWO4jy3pawZamBu53bbjoSh2u0GJ7F0j'
 
 router = APIRouter()
 video_clients = {}
@@ -135,14 +135,14 @@ def upload_plot(
     background_tasks.add_task(wait_finish, video_data)
 
     headers = {
-        'Authorization': 'Bearer ' + LINE_TOKEN    # 設定權杖
+        'Authorization': 'Bearer ' + LINE_TOKEN    
     }
     data = {
         'message':f'cloud.choozmo.com \
                     Video \
                     user: {current_user.id}\n \
                     video: {video_data["id"]}\n \
-                    state: queuing'     # 設定要發送的訊息
+                    state: queuing'     
     }
     data = requests.post(LINE_URL, headers=headers, data=data) 
     return  JSONResponse(return_msg, background=background_tasks)
@@ -167,7 +167,7 @@ async def wait_finish(video_data:dict):
     msg_data = f"{video_data['stored_filename']}:STARTED"
     await publish(msg_data)
     headers = {
-        'Authorization': 'Bearer ' + LINE_TOKEN    # 設定權杖
+        'Authorization': 'Bearer ' + LINE_TOKEN    
     }
     data = {
         'message':f'cloud.choozmo.com \
@@ -175,7 +175,7 @@ async def wait_finish(video_data:dict):
                     user: {video_data["owner_id"]}\n \
                     membership: {video_data["membership_status"]}\n \
                     video: {video_data["id"]}\n \
-                    state: start'     # 設定要發送的訊息
+                    state: start'     
     }
     data = requests.post(LINE_URL, headers=headers, data=data) 
     while True:
@@ -195,7 +195,7 @@ async def wait_finish(video_data:dict):
         db.close()
         msg_data = f"{video_data['stored_filename']}:SUCCESS:{int(time)}"
         headers = {
-            'Authorization': 'Bearer ' + LINE_TOKEN    # 設定權杖
+            'Authorization': 'Bearer ' + LINE_TOKEN    
         }
         data = {
             'message':f'cloud.choozmo.com \
@@ -203,7 +203,7 @@ async def wait_finish(video_data:dict):
                         user: {video_data["owner_id"]}\n \
                         membership: {video_data["membership_status"]}\n \
                         video: {video_data["id"]}\n \
-                        state: success'     # 設定要發送的訊息
+                        state: success'    
         }
         data = requests.post(LINE_URL, headers=headers, data=data)