return CommonService.defaultResponse(
this.serverApi.get(`/${this.resourceType}`, { params }),
this.actions,
+ true,
showErrors
);
} else {
return CommonService.defaultResponse(
this.serverApi.post(`/${this.resourceType}`, formData, {}),
this.actions,
+ true,
showErrors
);
}
}
- update(uuid: string, data: Partial<T>) {
+ update(uuid: string, data: Partial<T>, showErrors?: boolean) {
this.validateUuid(uuid);
return CommonService.defaultResponse(
this.serverApi
.put<T>(`/${this.resourceType}/${uuid}`, data && CommonService.mapKeys(snakeCase)(data)),
- this.actions
+ this.actions,
+ undefined, // mapKeys
+ showErrors
);
}
}