fix: add image link

This commit is contained in:
Methapon2001 2024-07-08 17:27:25 +07:00
parent b9cf8d3af3
commit 29e2933390

View file

@ -336,7 +336,13 @@ export class EmployeeController extends Controller {
throw new HttpError(HttpStatus.NOT_FOUND, "Employee cannot be found.", "employeeNotFound");
}
return record;
return Object.assign(record, {
profileImageUrl: await presignedGetObjectIfExist(
MINIO_BUCKET,
imageLocation(employeeId),
12 * 60 * 60,
),
});
}
@Post()