mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-06 20:59:36 +02:00
First webui commit
This commit is contained in:
parent
e38f5d08ab
commit
c4611b92f8
2011 changed files with 30382 additions and 1874 deletions
|
@ -5,4 +5,18 @@ const instance = axios.create({
|
|||
timeout: 1000 * 5
|
||||
});
|
||||
|
||||
export default instance;
|
||||
//axios.interceptors.request.use(function (config) {
|
||||
// const token = sessionStorage.getItem('token');
|
||||
// if (!token) return config;
|
||||
// config.headers.Authorization = "Bearer " + token;
|
||||
// return config;
|
||||
//});
|
||||
|
||||
const updateToken = () => {
|
||||
instance.defaults.headers.common['Authorization'] = 'Bearer ' + sessionStorage.getItem('token');
|
||||
}
|
||||
|
||||
export {
|
||||
instance as axios,
|
||||
updateToken as updateToken,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue