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:
parent
508ec00c6a
commit
f0582e18f7
19 changed files with 334 additions and 58 deletions
|
@ -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;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue