update something can update

This commit is contained in:
2024-11-08 17:27:09 +07:00
parent 7eabba1868
commit d7c7f8a782
10 changed files with 93 additions and 19 deletions

View File

@@ -41,8 +41,16 @@ export class UploadedFileSchema extends PothosSchema {
nullable: true,
description: 'The type of the file.',
}),
fileUrl: t.exposeString('fileUrl', {
fileUrl: t.string({
nullable: true,
description: 'The URL of the file.',
resolve: async (file) => {
return await this.minioService.updatePresignUrl(
file.id,
'files',
file.fileUrl,
)
},
}),
uploadedAt: t.expose('uploadedAt', {
type: 'DateTime',