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

add category to document

This commit is contained in:
Harvey Kandola 2017-09-22 17:23:14 +01:00
parent 508ec00c6a
commit f0582e18f7
19 changed files with 334 additions and 58 deletions

View file

@ -126,5 +126,22 @@ export default BaseService.extend({
}).then((response) => {
return response;
});
},
setCategoryMembership(categories, mode) {
return this.get('ajax').request(`category/member?mode=${mode}`, {
method: 'POST',
contentType: 'json',
data: JSON.stringify(categories)
});
},
// Get categories associated with a document.
getDocumentCategories(documentId) {
return this.get('ajax').request(`category/document/${documentId}`, {
method: 'GET'
}).then((response) => {
return response;
});
}
});