mirror of
https://github.com/go-shiori/shiori.git
synced 2025-09-06 13:05:30 +08:00
refactor: remove unneeded variable and unify the way send token in header (#763)
This commit is contained in:
parent
c05d617fbd
commit
106bf163ca
1 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue