update to use roload instead of rejection redirection

This commit is contained in:
2025-09-19 15:03:23 +02:00
parent c38a50af34
commit 9ec6fcf272
4 changed files with 7 additions and 8 deletions

View File

@@ -8,7 +8,6 @@ const env = Object.freeze({
const url = Object.freeze({
reject: `/api/annotation/reject`,
rejectRedir: `/envelope/${ENV_KEY}`,
share: `/api/readonly`
});
//#endregion
@@ -47,6 +46,10 @@ function postRequest(url, body = undefined) {
return sendRequest('POST', url, body);
}
function reload() {
window.location.reload();
}
function redirect(url) {
window.location.href = url;
}
@@ -81,10 +84,6 @@ function shareEnvelope(receiverMail, dateValid) {
}
//#endregion
function redirRejected() {
redirect(url.rejectRedir);
}
async function setLanguage(language) {
const hasLang = await getJson('/api/localization/lang')
.then(langs => langs.includes(language));