From cdce726ff12e1602c7cd213dd203515f4629cf1b Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 11 Dec 2025 09:35:01 +0700 Subject: [PATCH] feat(tkw): update file main code --- TrackingToolWeb/main.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/TrackingToolWeb/main.py b/TrackingToolWeb/main.py index 11def30..479e9af 100644 --- a/TrackingToolWeb/main.py +++ b/TrackingToolWeb/main.py @@ -249,23 +249,23 @@ async def checkin(file: UploadFile = File(...), camera_id: str = Form("cam1"), d - # thêm dô đây------------ - # id_log = 0 - # ms_response = create_history({"name": encoding.name.split('\n')[0], "time_string": f"{datetime.datetime.now()}", "status": "check in"}) - # id_log = ms_response.get('data').get('id') - # status = ms_response.get('data').get('status') + # thêm dô đây + id_log = 0 + ms_response = create_history({"name": encoding.name.split('\n')[0], "time_string": f"{datetime.datetime.now()}", "status": "check in"}) + id_log = ms_response.get('data').get('id') + status = ms_response.get('data').get('status') - # # reset pointer - # file.file.seek(0) + # reset pointer + file.file.seek(0) - # send_image_res = send_image( - # id=id_log, - # file=file, - # student_name=encoding.name, - # status=status - # ) + send_image_res = send_image( + id=id_log, + file=file, + student_name=encoding.name, + status=status + ) - # print(id_log, send_image_res) + print(id_log, send_image_res) # Insert new checkin db.execute(