Commit 07df5633 authored by Samir Sadyhov's avatar Samir Sadyhov 🤔

update appAPI.js

parent f326bfc4
...@@ -1034,6 +1034,15 @@ this.appAPI = { ...@@ -1034,6 +1034,15 @@ this.appAPI = {
} }
}, },
documentFilterInfo: async function(params){
return new Promise(async resolve => {
rest.synergyGet(`api/docflow/filter_info?locale=${AS.OPTIONS.locale}${params ? '&'+params : ''}`, resolve, err => {
console.log(`ERROR [ documentFilterInfo ]: ${JSON.stringify(err)}`);
resolve(null);
});
});
},
documentFilterDelete: async function(filterID){ documentFilterDelete: async function(filterID){
return new Promise(async resolve => { return new Promise(async resolve => {
try { try {
...@@ -1049,5 +1058,22 @@ this.appAPI = { ...@@ -1049,5 +1058,22 @@ this.appAPI = {
resolve(null); resolve(null);
} }
}); });
},
documentFilterBackDefault: async function(registerID){
return new Promise(async resolve => {
try {
const {login, password} = Cons.creds;
const url = `../Synergy/rest/api/docflow/register/filters/backDefault?registerID=${registerID}`;
const headers = new Headers();
headers.append("Authorization", "Basic " + btoa(unescape(encodeURIComponent(`${login}:${password}`))));
headers.append("Content-Type", "application/json; charset=UTF-8");
const response = await fetch(url, {method: 'POST', headers});
resolve(response.json());
} catch (err) {
console.log(`ERROR [ documentFilterBackDefault ]: ${err.message}`);
resolve(null);
}
});
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment