parent
2cbb431acc
commit
2a37dfafa4
@ -1,6 +1,6 @@
|
|||||||
import { writable } from 'svelte/store';
|
import { writable } from 'svelte/store';
|
||||||
import { OpenAPI, AuthService } from '@odit/lfk-client-js';
|
import { OpenAPI, AuthService } from '@odit/lfk-client-js';
|
||||||
import localForage from "localforage";
|
import localForage from 'localforage';
|
||||||
|
|
||||||
export let users = writable([]);
|
export let users = writable([]);
|
||||||
export let tracks = writable([]);
|
export let tracks = writable([]);
|
||||||
@ -26,7 +26,6 @@ const store = () => {
|
|||||||
console.log('refreshing auth');
|
console.log('refreshing auth');
|
||||||
AuthService.authControllerRefresh({ token: state.auth.refresh_token }).then((auth) => {
|
AuthService.authControllerRefresh({ token: state.auth.refresh_token }).then((auth) => {
|
||||||
console.log('got new auth');
|
console.log('got new auth');
|
||||||
console.log(auth);
|
|
||||||
OpenAPI.TOKEN = auth.access_token;
|
OpenAPI.TOKEN = auth.access_token;
|
||||||
localForage.setItem('logindata', auth);
|
localForage.setItem('logindata', auth);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user