mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 12:51:40 +02:00
Improve auth handling of rest apis used in frontend for compatibility
This commit is contained in:
@@ -283,7 +283,7 @@
|
||||
<form
|
||||
id="line-width-form"
|
||||
method="post"
|
||||
action="/config/configuration/"
|
||||
action="/userconfig//configuration/"
|
||||
class="card-body"
|
||||
on:submit|preventDefault={() =>
|
||||
handleSettingSubmit("#line-width-form", "lw")}
|
||||
@@ -329,7 +329,7 @@
|
||||
<form
|
||||
id="plots-per-row-form"
|
||||
method="post"
|
||||
action="/config/configuration/"
|
||||
action="/userconfig/configuration/"
|
||||
class="card-body"
|
||||
on:submit|preventDefault={() =>
|
||||
handleSettingSubmit("#plots-per-row-form", "ppr")}
|
||||
@@ -375,7 +375,7 @@
|
||||
<form
|
||||
id="backgrounds-form"
|
||||
method="post"
|
||||
action="/config/configuration/"
|
||||
action="/userconfig/configuration/"
|
||||
class="card-body"
|
||||
on:submit|preventDefault={() =>
|
||||
handleSettingSubmit("#backgrounds-form", "bg")}
|
||||
@@ -429,7 +429,7 @@
|
||||
<form
|
||||
id="paging-form"
|
||||
method="post"
|
||||
action="/config/configuration/"
|
||||
action="/userconfig/configuration/"
|
||||
class="card-body"
|
||||
on:submit|preventDefault={() =>
|
||||
handleSettingSubmit("#paging-form", "pag")}
|
||||
@@ -485,7 +485,7 @@
|
||||
<form
|
||||
id="colorscheme-form"
|
||||
method="post"
|
||||
action="/config/configuration/"
|
||||
action="/userconfig/configuration/"
|
||||
class="card-body"
|
||||
>
|
||||
<!-- Svelte 'class' directive only on DOMs directly, normal 'class="xxx"' does not work, so style-array it is. -->
|
||||
|
@@ -5,7 +5,7 @@
|
||||
let jwt = "";
|
||||
|
||||
function getUserJwt(username) {
|
||||
fetch(`/config/jwt/?username=${username}`)
|
||||
fetch(`/userconfig/jwt/?username=${username}`)
|
||||
.then((res) => res.text())
|
||||
.then((text) => {
|
||||
jwt = text;
|
||||
|
Reference in New Issue
Block a user