fix upload

This commit is contained in:
2024-10-18 15:02:06 +07:00
parent 99b3b19194
commit e76d77dadd
4 changed files with 4 additions and 44 deletions

View File

@@ -43,18 +43,8 @@ export class CenterSchema extends PothosSchema {
description: t.exposeString('description', {
description: 'The description of the center.',
}),
logoUrl: t.string({
logoUrl: t.exposeString('logoUrl', {
description: 'The URL of the center logo.',
resolve: async (center, args, ctx) => {
const fileUrl = await this.minioService.getFileUrl(
center.uploadedFileId ?? '',
'centers',
);
if (!fileUrl) {
return '';
}
return fileUrl;
},
}),
logoFile: t.relation('logoFile', {
description: 'The file associated with the center logo.',