mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
chore: Clarify usage of window fields in UIWindowDesktopBGSettings.js
/puter/src/UI/UIWindowDesktopBGSettings.js 168:26 error 'api_origin' is not defined no-undef 178:52 error 'auth_token' is not defined no-undef 182:29 error 'logout' is not defined no-undef 188:24 error Empty block statement no-empty
This commit is contained in:
parent
dea3bc1a7f
commit
93e13cdb06
@ -165,7 +165,7 @@ async function UIWindowDesktopBGSettings(options){
|
||||
// /set-desktop-bg
|
||||
try{
|
||||
$.ajax({
|
||||
url: api_origin + "/set-desktop-bg",
|
||||
url: window.api_origin + "/set-desktop-bg",
|
||||
type: 'POST',
|
||||
data: JSON.stringify({
|
||||
url: window.desktop_bg_url,
|
||||
@ -175,17 +175,18 @@ async function UIWindowDesktopBGSettings(options){
|
||||
async: true,
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
"Authorization": "Bearer "+auth_token
|
||||
"Authorization": "Bearer "+window.auth_token
|
||||
},
|
||||
statusCode: {
|
||||
401: function () {
|
||||
logout();
|
||||
window.logout();
|
||||
},
|
||||
},
|
||||
})
|
||||
$(el_window).close();
|
||||
resolve(true);
|
||||
}catch(err){
|
||||
// Ignore
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user