chore: add bracket

This commit is contained in:
Methapon2001 2024-06-14 17:57:58 +07:00
parent d86a209639
commit f8a317235f

View file

@ -123,8 +123,9 @@ export class ServiceController extends Controller {
where: { id: serviceId },
});
if (!record)
if (!record) {
throw new HttpError(HttpStatus.NOT_FOUND, "Service cannot be found.", "serviceNotFound");
}
return Object.assign(record, {
imageUrl: await presignedGetObjectIfExist(MINIO_BUCKET, imageLocation(record.id), 60 * 60),
@ -209,7 +210,6 @@ export class ServiceController extends Controller {
},
{ isolationLevel: Prisma.TransactionIsolationLevel.Serializable },
);
this.setStatus(HttpStatus.CREATED);
return Object.assign(record, {