This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "HospitalAssistantBackend"
|
name = "HospitalAssistantBackend"
|
||||||
version = "1.4.0"
|
version = "1.4.1"
|
||||||
description = "Backend for Hospital Assistant"
|
description = "Backend for Hospital Assistant"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.13,<3.14"
|
requires-python = ">=3.13,<3.14"
|
||||||
|
|||||||
@ -109,11 +109,14 @@ async def get_vaccs_report_download(
|
|||||||
Get report of vaccinations for user by id.
|
Get report of vaccinations for user by id.
|
||||||
"""
|
"""
|
||||||
if resultId is not None:
|
if resultId is not None:
|
||||||
model = await c.vitacore_api.getDiagResultFile(resultId)
|
file = await c.vitacore_api.getDiagResultFile(resultId)
|
||||||
else:
|
else:
|
||||||
model = await c.vitacore_api.getVaccsReport(user.vita_id)
|
file = await c.vitacore_api.getVaccsReport(user.vita_id)
|
||||||
|
|
||||||
file_bytes = base64.b64decode(model.content)
|
if file is None:
|
||||||
|
raise e.BadRequestException
|
||||||
|
|
||||||
|
file_bytes = base64.b64decode(file.content)
|
||||||
filename = f'vaccs_report_{resultId or user.vita_id}.doc'
|
filename = f'vaccs_report_{resultId or user.vita_id}.doc'
|
||||||
|
|
||||||
return Response(
|
return Response(
|
||||||
|
|||||||
Reference in New Issue
Block a user