mirror of
https://github.com/documize/community.git
synced 2025-07-22 22:59:43 +02:00
parent
2b66d0096a
commit
e014f5b5c1
18 changed files with 541 additions and 88 deletions
|
@ -567,7 +567,37 @@ export default Service.extend({
|
|||
}).catch((error) => {
|
||||
return error;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//**************************************************
|
||||
// Pinning documents inside spaces.
|
||||
//**************************************************
|
||||
|
||||
// Pin document
|
||||
pin(documentId) {
|
||||
return this.get('ajax').request(`document/pin/${documentId}`, {
|
||||
method: 'POST'
|
||||
}).then((response) => {
|
||||
return response;
|
||||
});
|
||||
},
|
||||
|
||||
// Unpin document
|
||||
unpin(documentId) {
|
||||
return this.get('ajax').request(`document/unpin/${documentId}`, {
|
||||
method: 'DELETE'
|
||||
}).then((response) => {
|
||||
return response;
|
||||
});
|
||||
},
|
||||
|
||||
onPinSequence(documentId, direction) {
|
||||
return this.get('ajax').request(`document/pinmove/${documentId}?direction=${direction}`, {
|
||||
method: 'POST'
|
||||
}).then((response) => {
|
||||
return response;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function isObject(a) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue