mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Added passive authorization
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
var App = App || {};
|
||||
|
||||
App.API = function(promise) {
|
||||
App.API = function(promise, appState) {
|
||||
|
||||
var baseUrl = '/api/';
|
||||
|
||||
@ -26,6 +26,9 @@ App.API = function(promise) {
|
||||
|
||||
return promise.make(function(resolve, reject) {
|
||||
$.ajax({
|
||||
headers: {
|
||||
'X-Authorization-Token': appState.get('loginToken') || '',
|
||||
},
|
||||
success: function(data, textStatus, xhr) {
|
||||
resolve({
|
||||
status: xhr.status,
|
||||
|
Reference in New Issue
Block a user