Merge pull request 'feat(tkw): update file main code' (#144) from zelda.update-static-file-tracking-tool-web into master

Reviewed-on: #144
This commit is contained in:
zelda 2025-12-11 13:35:33 +11:00
commit 9183540976
1 changed files with 14 additions and 14 deletions

View File

@ -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(