|
@@ -137,7 +137,7 @@ async def history_input():
|
|
|
statement = 'SELECT * FROM history_input ORDER BY timestamp DESC'
|
|
|
logs = []
|
|
|
for row in db.query(statement):
|
|
|
- logs.append({'id':row['id'],'name':row['name'],'text_content':row['text_content'],'image_urls':row['image_urls']})
|
|
|
+ logs.append({'id':row['id'],'name':row['name'],'text_content':row['text_content'].split(','),'image_urls':row['image_urls'].split(',')})
|
|
|
return logs
|
|
|
|
|
|
@app.post("/log_test")
|
|
@@ -151,7 +151,7 @@ async def log_test(req:request2):
|
|
|
img_urls_seperate_by_dot = ''
|
|
|
for iurl in req.image_urls:
|
|
|
img_urls_seperate_by_dot += iurl+","
|
|
|
- img_urls_seperate_by_dot[:-1]
|
|
|
+ img_urls_seperate_by_dot = img_urls_seperate_by_dot[:-1]
|
|
|
time_stamp = datetime.fromtimestamp(time.time())
|
|
|
time_stamp = time_stamp.strftime("%Y-%m-%d %H:%M:%S")
|
|
|
pk = log_table.insert({'name':req.name,'text_content':txt_content_seperate_by_dot,'image_urls':img_urls_seperate_by_dot,'timestamp':time_stamp})
|