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:
parent
e9def2e71f
commit
0655fab204
6 changed files with 24 additions and 23 deletions
|
@ -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'
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue