1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-27 00:59:43 +02:00

changed delete page to use DELETE verb and more Ember idiomatic

This commit is contained in:
Harvey Kandola 2016-10-13 11:31:09 -07:00
parent e9def2e71f
commit 0655fab204
6 changed files with 24 additions and 23 deletions

View file

@ -145,11 +145,12 @@ export default Ember.Service.extend({
// Nukes multiple pages from the document.
deletePages: function (documentId, pageId, payload) {
let url = `documents/${documentId}/pages/${pageId}`;
let url = `documents/${documentId}/pages`;
return this.get('ajax').post(url, {
return this.get('ajax').request(url, {
data: JSON.stringify(payload),
contentType: 'json'
contentType: 'json',
method: 'DELETE'
});
},