mirror of
https://github.com/documize/community.git
synced 2025-08-01 03:25:25 +02:00
Merge code between editions
This commit is contained in:
parent
d1b803b246
commit
6a9ad7f540
20 changed files with 365 additions and 110 deletions
|
@ -41,10 +41,23 @@ export default Service.extend({
|
|||
}
|
||||
},
|
||||
|
||||
|
||||
// Returns product subscription.
|
||||
getSubscription() {
|
||||
if(this.get('sessionService.isAdmin')) {
|
||||
return this.get('ajax').request(`subscription`, {
|
||||
method: 'GET',
|
||||
dataType: 'JSON'
|
||||
}).then((response) => {
|
||||
return response;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// Returns product license.
|
||||
getLicense() {
|
||||
if(this.get('sessionService.isGlobalAdmin')) {
|
||||
return this.get('ajax').request(`global/license`, {
|
||||
if(this.get('sessionService.isAdmin')) {
|
||||
return this.get('ajax').request(`license`, {
|
||||
method: 'GET',
|
||||
dataType: "text"
|
||||
}).then((response) => {
|
||||
|
@ -53,10 +66,10 @@ export default Service.extend({
|
|||
}
|
||||
},
|
||||
|
||||
// Saves product license.
|
||||
saveLicense(license) {
|
||||
if(this.get('sessionService.isGlobalAdmin')) {
|
||||
return this.get('ajax').request(`global/license`, {
|
||||
// Saves product subscription data.
|
||||
setLicense(license) {
|
||||
if(this.get('sessionService.isAdmin')) {
|
||||
return this.get('ajax').request(`license`, {
|
||||
method: 'PUT',
|
||||
dataType: 'text',
|
||||
data: license
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue