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

implemented move content to another document

This commit is contained in:
Harvey Kandola 2017-01-22 15:22:14 -08:00
parent 07ee2248d4
commit b5a595e305
9 changed files with 105 additions and 19 deletions

View file

@ -325,6 +325,16 @@ export default Ember.Service.extend({
let data = this.get('store').normalize('page', response);
return this.get('store').push(data);
});
},
// Move existing page to different document.
movePage(documentId, pageId, targetDocumentId) {
return this.get('ajax').request(`documents/${documentId}/pages/${pageId}/move/${targetDocumentId}`, {
method: 'POST'
}).then((response) => {
let data = this.get('store').normalize('page', response);
return this.get('store').push(data);
});
}
});