Skip to content

Commit

Permalink
refactor: remove unneeded variable and unify the way send token in he…
Browse files Browse the repository at this point in the history
…ader (#763)
  • Loading branch information
Monirzadeh committed Oct 17, 2023
1 parent c05d617 commit 106bf16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/view/assets/js/page/setting.js
Expand Up @@ -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,
Expand All @@ -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();
Expand Down

0 comments on commit 106bf16

Please sign in to comment.