aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features/repo-editor.js
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2021-10-21 15:37:43 +0800
committerGitHub <noreply@github.com>2021-10-21 15:37:43 +0800
commit2add8fe9beede4aa82c913fcb70c0cf5bb1c6185 (patch)
treebe2555d0a8f0ae926d56eefd3a3b3e533985074a /web_src/js/features/repo-editor.js
parent5879ab83b5fab57a71aed4c8b3c4d9293b4a4398 (diff)
downloadgitea-2add8fe9beede4aa82c913fcb70c0cf5bb1c6185.tar.gz
gitea-2add8fe9beede4aa82c913fcb70c0cf5bb1c6185.zip
Frontend refactor, PascalCase to camelCase, remove unused code (#17365)
* Frontend refactor, PascalCase to camelCase, remove unused code * fix
Diffstat (limited to 'web_src/js/features/repo-editor.js')
-rw-r--r--web_src/js/features/repo-editor.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/web_src/js/features/repo-editor.js b/web_src/js/features/repo-editor.js
index 831b621fde..e2acaafd12 100644
--- a/web_src/js/features/repo-editor.js
+++ b/web_src/js/features/repo-editor.js
@@ -1,7 +1,7 @@
import {initMarkupContent} from '../markup/content.js';
import {createCodeEditor} from './codeeditor.js';
-const {csrf} = window.config;
+const {csrfToken} = window.config;
let previewFileModes;
@@ -21,7 +21,7 @@ function initEditPreviewTab($form) {
}
context = context.substring(0, context.lastIndexOf('/'));
$.post($this.data('url'), {
- _csrf: csrf,
+ _csrf: csrfToken,
mode,
context,
text: $form.find(`.tab[data-tab="${$tabMenu.data('write')}"] textarea`).val()
@@ -40,7 +40,7 @@ function initEditDiffTab($form) {
$tabMenu.find(`.item[data-tab="${$tabMenu.data('diff')}"]`).on('click', function () {
const $this = $(this);
$.post($this.data('url'), {
- _csrf: csrf,
+ _csrf: csrfToken,
context: $this.data('context'),
content: $form.find(`.tab[data-tab="${$tabMenu.data('write')}"] textarea`).val()
}, (data) => {