fix: missing qr code image url on get
This commit is contained in:
parent
e7568fa06f
commit
b1b93f0e34
1 changed files with 15 additions and 1 deletions
|
|
@ -58,7 +58,21 @@ export class BranchContactController extends Controller {
|
||||||
prisma.branchContact.count({ where: { branchId } }),
|
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}")
|
@Get("{contactId}")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue