mirror of
https://github.com/thomiceli/opengist.git
synced 2024-12-22 20:42:40 +00:00
Various bug fixes (#105)
This commit is contained in:
parent
a5ea522e45
commit
9dff67f003
2 changed files with 3 additions and 2 deletions
|
@ -377,7 +377,6 @@ func (gist *Gist) UpdatePreviewAndCount() error {
|
|||
gist.Preview = file.Content
|
||||
}
|
||||
|
||||
gist.Preview = file.Content
|
||||
gist.PreviewFilename = file.Filename
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,9 @@ const setSetting = (key: string, value: string) => {
|
|||
const data = new URLSearchParams();
|
||||
data.append('key', key);
|
||||
data.append('value', 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',
|
||||
|
|
Loading…
Reference in a new issue