Sfoglia il codice sorgente

modify line notiry

tomoya 7 mesi fa
parent
commit
bca7918639
1 ha cambiato i file con 10 aggiunte e 10 eliminazioni
  1. 10 10
      backend/app/app/api/api_v1/endpoints/videos.py

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

@@ -138,8 +138,8 @@ def upload_plot(
         'Authorization': 'Bearer ' + LINE_TOKEN    
         'Authorization': 'Bearer ' + LINE_TOKEN    
     }
     }
     data = {
     data = {
-        'message':f'cloud.choozmo.com \
-                    Video \
+        'message':f'cloud-choozmo-com\n \
+                    Video\n \
                     user: {current_user.id}\n \
                     user: {current_user.id}\n \
                     video: {video_data["id"]}\n \
                     video: {video_data["id"]}\n \
                     state: queuing'     
                     state: queuing'     
@@ -170,8 +170,8 @@ async def wait_finish(video_data:dict):
         'Authorization': 'Bearer ' + LINE_TOKEN    
         'Authorization': 'Bearer ' + LINE_TOKEN    
     }
     }
     data = {
     data = {
-        'message':f'cloud.choozmo.com \
-                    Video \
+        'message':f'cloud-choozmo-com\n \
+                    Video\n \
                     user: {video_data["owner_id"]}\n \
                     user: {video_data["owner_id"]}\n \
                     membership: {video_data["membership_status"]}\n \
                     membership: {video_data["membership_status"]}\n \
                     video: {video_data["id"]}\n \
                     video: {video_data["id"]}\n \
@@ -198,8 +198,8 @@ async def wait_finish(video_data:dict):
             'Authorization': 'Bearer ' + LINE_TOKEN    
             'Authorization': 'Bearer ' + LINE_TOKEN    
         }
         }
         data = {
         data = {
-            'message':f'cloud.choozmo.com \
-                        Video \
+            'message':f'cloud-choozmo-com\n \
+                        Video\n \
                         user: {video_data["owner_id"]}\n \
                         user: {video_data["owner_id"]}\n \
                         membership: {video_data["membership_status"]}\n \
                         membership: {video_data["membership_status"]}\n \
                         video: {video_data["id"]}\n \
                         video: {video_data["id"]}\n \
@@ -216,15 +216,15 @@ async def wait_finish(video_data:dict):
         msg_data = f"{video_data['stored_filename']}:FAILURE"
         msg_data = f"{video_data['stored_filename']}:FAILURE"
 
 
         headers = {
         headers = {
-            'Authorization': 'Bearer ' + LINE_TOKEN    # 設定權杖
+            'Authorization': 'Bearer ' + LINE_TOKEN   
         }
         }
         data = {
         data = {
-            'message':f'cloud.choozmo.com \
-                        Video \
+            'message':f'cloud-choozmo-com\n \
+                        Video\n \
                         user: {video_data["owner_id"]}\n \
                         user: {video_data["owner_id"]}\n \
                         membership: {video_data["membership_status"]}\n \
                         membership: {video_data["membership_status"]}\n \
                         video: {video_data["id"]}\n \
                         video: {video_data["id"]}\n \
-                        state: failure'     # 設定要發送的訊息
+                        state: failure'     
         }
         }
         data = requests.post(LINE_URL, headers=headers, data=data) 
         data = requests.post(LINE_URL, headers=headers, data=data)