mirror of
https://github.com/thomiceli/opengist.git
synced 2025-06-13 05:47:12 +02:00
Various bug fixes (#105)
This commit is contained in:
@ -11,7 +11,9 @@ const setSetting = (key: string, value: string) => {
|
||||
const data = new URLSearchParams();
|
||||
data.append('key', key);
|
||||
data.append('value', value);
|
||||
data.append('_csrf', ((document.getElementsByName('_csrf')[0] as HTMLInputElement).value));
|
||||
if (document.getElementsByName('_csrf').length !== 0) {
|
||||
data.append('_csrf', ((document.getElementsByName('_csrf')[0] as HTMLInputElement).value));
|
||||
}
|
||||
return fetch('/admin-panel/set-config', {
|
||||
method: 'PUT',
|
||||
credentials: 'same-origin',
|
||||
|
Reference in New Issue
Block a user