mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
templates moved to new API
This commit is contained in:
parent
23e111f60d
commit
5e2c96bf5b
7 changed files with 1037 additions and 647 deletions
|
@ -20,14 +20,6 @@ export default Ember.Service.extend({
|
|||
ajax: service(),
|
||||
store: service(),
|
||||
|
||||
importStockTemplate: function (folderId, templateId) {
|
||||
let url = `templates/${templateId}/folder/${folderId}?type=stock`;
|
||||
|
||||
return this.get('ajax').request(url, {
|
||||
method: "POST"
|
||||
});
|
||||
},
|
||||
|
||||
importSavedTemplate: function (folderId, templateId, docName) {
|
||||
let url = `templates/${templateId}/folder/${folderId}?type=saved`;
|
||||
|
||||
|
@ -36,7 +28,7 @@ export default Ember.Service.extend({
|
|||
data: docName
|
||||
}).then((doc) => {
|
||||
let data = this.get('store').normalize('document', doc);
|
||||
return this.get('store').push(data);
|
||||
return this.get('store').push(data);
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -60,12 +52,6 @@ export default Ember.Service.extend({
|
|||
});
|
||||
},
|
||||
|
||||
getStockTemplates() {
|
||||
return this.get('ajax').request(`templates/stock`, {
|
||||
method: 'GET'
|
||||
});
|
||||
},
|
||||
|
||||
saveAsTemplate(documentId, name, excerpt) {
|
||||
let payload = {
|
||||
DocumentID: documentId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue