File tree Expand file tree Collapse file tree 4 files changed +17
-38
lines changed Expand file tree Collapse file tree 4 files changed +17
-38
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ {
2
+ "presets" : [
3
+ " stage-2" ,
4
+ " react"
5
+ ]
6
+ }
Original file line number Diff line number Diff line change 1
- const axios = require ( "axios" ) ;
2
-
3
- const constants = require ( "./constants" ) ;
1
+ import axios from "axios" ;
2
+ import { AUTH_KEY , IP_ADDRESS_KEY } from "./constants" ;
4
3
5
4
/**
6
5
* Global level axios configuration. These settings are automatically used in other places by using an axiosInstance instead of axios directly
@@ -15,9 +14,9 @@ export let axiosInstance = axios.create({
15
14
*/
16
15
axiosInstance . interceptors . request . use (
17
16
config => {
18
- config . baseURL = localStorage . getItem ( constants . IP_ADDRESS_KEY ) ;
17
+ config . baseURL = localStorage . getItem ( IP_ADDRESS_KEY ) ;
19
18
20
- config . headers . Authorization = 'Basic ' + localStorage . getItem ( constants . AUTH_KEY ) ;
19
+ config . headers . Authorization = 'Basic ' + localStorage . getItem ( AUTH_KEY ) ;
21
20
return config ;
22
21
} ,
23
22
error => Promise . reject ( error )
Original file line number Diff line number Diff line change 1
- const axiosInstance = require ( './axiosInstance' ) ;
2
- const urls = require ( './endpoint' ) ;
3
- const tools = require ( './Tools' )
1
+ import { axiosInstance } from "./axiosInstance" ;
2
+ import urls from "./endpoint" ;
3
+ import { addColonAtLast , isLocalRemoteName } from "./Tools" ;
4
+
5
+ // const axiosInstance = require('./axiosInstance');
6
+ // const urls = require('./endpoint');
7
+ // const tools = require('./Tools')
4
8
5
9
/**
6
10
* getStats returns the current rclone stats.
You can’t perform that action at this time.
0 commit comments