feat: return null if no image exist

This commit is contained in:
Methapon2001 2024-06-10 13:12:26 +07:00
parent a6d8f1c7f6
commit 6750ba8c34

View file

@ -302,7 +302,7 @@ export class CustomerController extends Controller {
this.setStatus(HttpStatus.CREATED);
return Object.assign(record, {
imageUrl: await minio.presignedGetObject(
imageUrl: await presignedGetObjectIfExist(
MINIO_BUCKET,
imageLocation(record.id),
12 * 60 * 60,