@gandalan/weblibs 0.0.12 → 0.0.15
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 +14 -1
- package/package.json +1 -1
package/api/IDAS.js
CHANGED
|
@@ -16,7 +16,11 @@ let authToken = localStorage.getItem("IDAS_AuthToken");
|
|
|
16
16
|
//let mandantGuid = localStorage.getItem("IDAS_MandantGuid");
|
|
17
17
|
let apiBaseUrl = localStorage.getItem("IDAS_ApiBaseUrl") || "https://api.dev.idas-cloudservices.net/api";
|
|
18
18
|
//let siteBaseUrl = localStorage.getItem("SiteBaseUrl") || window.location.protocol + "//" + window.location.host;
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
let ssoAuthUrl = apiBaseUrl + "/SSO?a=" + appToken + "&r=%target%?t=%token%%26m=%mandant%";
|
|
21
|
+
ssoAuthUrl = ssoAuthUrl.replace('/api/', '/');
|
|
22
|
+
ssoAuthUrl = ssoAuthUrl.replace('//', '/');
|
|
23
|
+
|
|
20
24
|
let restClient = new RESTClient(apiBaseUrl, authToken);
|
|
21
25
|
restClient.onError = (error, message) => {
|
|
22
26
|
if (message.indexOf("401") || message.indexOf("403"))
|
|
@@ -65,6 +69,15 @@ export class IDAS
|
|
|
65
69
|
async save(m) { await restClient.put("/Benutzer", m); }
|
|
66
70
|
};
|
|
67
71
|
|
|
72
|
+
feedback = {
|
|
73
|
+
async getAll() { return await restClient.get("/Feedback/"); },
|
|
74
|
+
async get(guid) { return await restClient.get("/Feedback/" + guid); },
|
|
75
|
+
async save(m) { await restClient.put("/Feedback", m); },
|
|
76
|
+
async comment(m) { await restClient.put("/FeedbackKommentar", m); },
|
|
77
|
+
async attachFile(m) { await restClient.put("/FeedbackAttachment", m); },
|
|
78
|
+
async deleteFile(guid) { await restClient.delete("/FeedbackAttachment/" + guid); }
|
|
79
|
+
};
|
|
80
|
+
|
|
68
81
|
rollen = {
|
|
69
82
|
async getAll() { return await restClient.get("/Rollen"); },
|
|
70
83
|
async save(m) { await restClient.put("/Rollen", m); }
|