Browse Source

fix sytax error

ming 3 years ago
parent
commit
72ce06329a
1 changed files with 2 additions and 4 deletions
  1. 2 4
      api/main.py

+ 2 - 4
api/main.py

@@ -137,10 +137,8 @@ def protected(request: Request, Authorize: AuthJWT = Depends()):
     statement = 'SELECT * FROM history_input WHERE user_id='+str(user_obj['id'])
     for row in db.query(statement):
         video_info_list.append({'id':row['id'],'title':row['name'],'duration':row['duration'],'url':row['url']})
-    
-    return {'user_info':{'userName':current_user,'email':user_obj['email'],'video_num':video_num,'total_sec':total_sec,'left_sec':user_obj['left_time']}
-            ,'video_info':video_info_list}
-
+    dic_return = {'user_info':{'userName':current_user,'email':user_obj['email'],'video_num':video_num,'total_sec':total_sec,'left_sec':user_obj['left_time']},'video_info':video_info_list}
+    return str(dic_return)
 
 # login & register page
 @app.get("/login", response_class=HTMLResponse)