Fix uploading attachments

This commit is contained in:
kolaente 2020-04-26 16:28:02 +02:00
parent 747a912475
commit 86aebc48a0
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -46,20 +46,20 @@ export default class AbstractService {
case 'post': case 'post':
if (this.useUpdateInterceptor()) { if (this.useUpdateInterceptor()) {
config.data = self.beforeUpdate(config.data) config.data = self.beforeUpdate(config.data)
}
config.data = JSON.stringify(objectToSnakeCase(config.data)) config.data = JSON.stringify(objectToSnakeCase(config.data))
}
break break
case 'put': case 'put':
if (this.useCreateInterceptor()) { if (this.useCreateInterceptor()) {
config.data = self.beforeCreate(config.data) config.data = self.beforeCreate(config.data)
}
config.data = JSON.stringify(objectToSnakeCase(config.data)) config.data = JSON.stringify(objectToSnakeCase(config.data))
}
break break
case 'delete': case 'delete':
if (this.useDeleteInterceptor()) { if (this.useDeleteInterceptor()) {
config.data = self.beforeDelete(config.data) config.data = self.beforeDelete(config.data)
}
config.data = JSON.stringify(objectToSnakeCase(config.data)) config.data = JSON.stringify(objectToSnakeCase(config.data))
}
break break
} }
return config return config