diff --git a/src/controllers/branch/contact-controller.ts b/src/controllers/branch/contact-controller.ts index 9607afb..9598bb8 100644 --- a/src/controllers/branch/contact-controller.ts +++ b/src/controllers/branch/contact-controller.ts @@ -58,7 +58,21 @@ export class BranchContactController extends Controller { prisma.branchContact.count({ where: { branchId } }), ]); - return { result, page, pageSize, total }; + return { + result: await Promise.all( + result.map(async (v) => ({ + ...v, + qrCodeImageUrl: await minio.presignedGetObject( + MINIO_BUCKET, + imageLocation(v.id), + 12 * 60 * 60, + ), + })), + ), + page, + pageSize, + total, + }; } @Get("{contactId}")