浏览代码

addr test

ming 3 年之前
父节点
当前提交
cf2132ab54
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      api/main.py

+ 2 - 2
api/main.py

@@ -114,9 +114,9 @@ async def get_courses(tags:List[int]):
     'WHERE tag.id IN'+tag_str
 
     for row in db.query(statement):
-        courses.append({'id':row['course_id'],'title':row['title'],'url':row['url'],'cover_img':'serverADDR'+row['cover_img']
+        courses.append({'id':row['course_id'],'title':row['title'],'url':row['url']
         ,'teacher_name':['teacher_name'],'price':row['price'],'price_discount':row['price_discount'],'profile':row['profile']
-        ,'cover_img':row['cover_img'],'hours':row['hours'],'units':row['units']})
+        ,'cover_img':serverADDR + row['cover_img'],'hours':row['hours'],'units':row['units']})
     return courses
 
 @app.post("/courses")