feat(network.js): Methode zum Abrufen von Anmerkungsparametern hinzugefügt

This commit is contained in:
Developer 02
2025-03-21 15:39:24 +01:00
parent a7b980bd28
commit 2dfe508552
2 changed files with 10 additions and 6 deletions

View File

@@ -69,7 +69,7 @@
* Creates a GET HTTP request to `url`
* @param {any} url
*/
getRequest(url, body) {
getRequest(url) {
const token = this.getCSRFToken()
const options = {
credentials: 'include',
@@ -79,10 +79,6 @@
}
}
if (body !== undefined) {
options.body = JSON.stringify(body);
}
return fetch(url, options)
}
@@ -206,4 +202,12 @@ async function logout() {
if (res.ok)
window.location.href = "/";
});
}
async function getAnnotationParams() {
return fetch(`${window.location.origin}/api/Config/Annotations`, {
credentials: 'include',
method: 'GET'
})
.then(res => res.json());
}