2
votes

On my api, I only get a 200 and 'success' message in my response. after calling DELETE on a record. I was wondering if there was some way to normalize this into a empty object that REST is expecting.

I've tried all the normalizeDeleteRecordResponse, normalizeSaveRecordResponse, but they don't seem to be catching.

Thanks in advance.

1

1 Answers

1
votes

Try this:

normalizeDeleteRecordResponse (store, primaryModelClass, payload, id, requestType){
  var payload_ = {};
  payload_[primaryModelClass.modelName] = {id: id};
  return this._super(store, primaryModelClass, payload_, id, requestType);
}