feat: return null if no image exist
This commit is contained in:
parent
6750ba8c34
commit
629805b6f1
1 changed files with 1 additions and 1 deletions
|
|
@ -200,7 +200,7 @@ export class CustomerController extends Controller {
|
|||
if (!record)
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "Customer cannot be found.", "data_not_found");
|
||||
return Object.assign(record, {
|
||||
imageUrl: await minio.presignedGetObject(
|
||||
imageUrl: await presignedGetObjectIfExist(
|
||||
MINIO_BUCKET,
|
||||
imageLocation(record.id),
|
||||
12 * 60 * 60,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue