From 47f6d39cd39159cdcc1162817a0bb2ad64b7b805 Mon Sep 17 00:00:00 2001 From: monirzadeh <25131576+Monirzadeh@users.noreply.github.com> Date: Mon, 16 Oct 2023 22:22:51 +0330 Subject: [PATCH] remove unneeded variable and unify the way send token in header --- internal/view/assets/js/page/setting.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/view/assets/js/page/setting.js b/internal/view/assets/js/page/setting.js index 209ded43b..cf4fc4dc9 100644 --- a/internal/view/assets/js/page/setting.js +++ b/internal/view/assets/js/page/setting.js @@ -83,7 +83,6 @@ export default { }, methods: { saveSetting() { - var authToken = JSON.parse(localStorage.getItem("shiori-token")); let options = { ShowId: this.appOptions.ShowId, ListMode: this.appOptions.ListMode, @@ -108,9 +107,10 @@ export default { body: JSON.stringify({ config: this.appOptions }), - headers: { "Content-Type": "application/json", - Authorization: `Bearer ${authToken}`, - }, + headers: { + 'Content-Type': 'application/json', + 'Authorization': 'Bearer ' + localStorage.getItem("shiori-token"), + } }).then(response => { if (!response.ok) throw response; return response.json();