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