fix upload
This commit is contained in:
@@ -50,18 +50,8 @@ export class ServiceSchema extends PothosSchema {
|
||||
imageFileId: t.exposeID('imageFileId', {
|
||||
description: 'The ID of the image file for the service.',
|
||||
}),
|
||||
imageFileUrl: t.string({
|
||||
imageFileUrl: t.exposeString('imageFileUrl', {
|
||||
description: 'The URL of the image file for the service.',
|
||||
resolve: async (service, args, ctx) => {
|
||||
const fileUrl = await this.minioService.getFileUrl(
|
||||
service.imageFileId ?? '',
|
||||
'services',
|
||||
);
|
||||
if (!fileUrl) {
|
||||
return '';
|
||||
}
|
||||
return fileUrl;
|
||||
},
|
||||
}),
|
||||
createdAt: t.expose('createdAt', {
|
||||
type: 'DateTime',
|
||||
|
||||
Reference in New Issue
Block a user