update something can update
This commit is contained in:
@@ -59,10 +59,24 @@ export class ServiceSchema extends PothosSchema {
|
||||
description: 'The image file for the service.',
|
||||
}),
|
||||
imageFileId: t.exposeID('imageFileId', {
|
||||
nullable: true,
|
||||
description: 'The ID of the image file for the service.',
|
||||
}),
|
||||
imageFileUrl: t.exposeString('imageFileUrl', {
|
||||
imageFileUrl: t.string({
|
||||
nullable: true,
|
||||
description: 'The URL of the image file for the service.',
|
||||
resolve: async (service) => {
|
||||
// get file id from imageFileUrl
|
||||
const imageFileId = service.imageFileUrl
|
||||
?.split('/')
|
||||
.pop()
|
||||
?.split('?')[0]
|
||||
return await this.minioService.updatePresignUrl(
|
||||
imageFileId ?? '',
|
||||
'files',
|
||||
service.imageFileUrl ?? undefined,
|
||||
)
|
||||
},
|
||||
}),
|
||||
status: t.expose('status', {
|
||||
type: ServiceStatus,
|
||||
|
||||
Reference in New Issue
Block a user