@gandalan/weblibs 0.0.34 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/IDAS.js +18 -3
- package/package.json +1 -1
package/api/IDAS.js
CHANGED
|
@@ -6,7 +6,7 @@ let apiBaseUrl = localStorage.getItem('IDAS_ApiBaseUrl') || 'https://api.dev.ida
|
|
|
6
6
|
|
|
7
7
|
let restClient = new RESTClient(apiBaseUrl, authToken);
|
|
8
8
|
restClient.onError = (error, message) => {
|
|
9
|
-
if (message.indexOf(
|
|
9
|
+
if (message.indexOf("401") != -1 || message.indexOf("403") != -1) {
|
|
10
10
|
localStorage.removeItem('IDAS_AuthToken');
|
|
11
11
|
new IDAS().authenticateWithSSO(true);
|
|
12
12
|
}
|
|
@@ -85,8 +85,8 @@ export class IDAS {
|
|
|
85
85
|
async comment(guid, commentData) {
|
|
86
86
|
await restClient.put(`/FeedbackKommentar/${guid}`, commentData);
|
|
87
87
|
},
|
|
88
|
-
async attachFile(
|
|
89
|
-
await restClient.put(
|
|
88
|
+
async attachFile(guid, filename, data) {
|
|
89
|
+
await restClient.put(`/FeedbackAttachment/?feedbackGuid=${guid}&filename=${filename}`, data);
|
|
90
90
|
},
|
|
91
91
|
async deleteFile(guid) {
|
|
92
92
|
await restClient.delete(`/FeedbackAttachment/${guid}`);
|
|
@@ -101,4 +101,19 @@ export class IDAS {
|
|
|
101
101
|
await restClient.put('/Rollen', m);
|
|
102
102
|
},
|
|
103
103
|
};
|
|
104
|
+
|
|
105
|
+
vorgaenge = {
|
|
106
|
+
async getByVorgangsnummer(vorgangsNummer, jahr) {
|
|
107
|
+
return await restClient.get(`/Vorgang/${vorgangsNummer}/${jahr}`);
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
positionen = {
|
|
112
|
+
async getByPcode(pcode) {
|
|
113
|
+
return await restClient.get(`/BelegPositionen/GetByPcode/${pcode}`);
|
|
114
|
+
},
|
|
115
|
+
async get(guid) {
|
|
116
|
+
return await restClient.get(`/BelegPositionen/Get/${guid}`);
|
|
117
|
+
},
|
|
118
|
+
};
|
|
104
119
|
}
|