8000 change Rc calls to rclone-api · corner4world/rclone-webui-react@9470f8a · GitHub
[go: up one dir, main page]

Skip to content

Commit 9470f8a

Browse files
committed
change Rc calls to rclone-api
1 parent 89341a3 commit 9470f8a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"redux-thunk": "^2.3.0",
4949
"reselect": "^4.0.0",
5050
"simple-line-icons": "^2.4.1",
51-
"typescript": "^3.7.5"
51+
"typescript": "^3.7.5",
52+
"rclone-api": "^1.0.0"
5253
},
5354
"devDependencies": {
5455
"@babel/core": "^7.10.2",

src/actions/providerStatusActions.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {addColonAtLast, isLocalRemoteName} from "../utils/Tools";
22
import {GET_REMOTE_ABOUT, REQUEST_ERROR, REQUEST_SUCCESS} from "../actions/types";
3-
import axiosInstance from "../utils/API/API";
4-
import urls from "../utils/API/endpoint";
3+
import {getRemoteInfo} from "rclone-api";
54

65
/**
76
* Gets the information of a provider
@@ -29,13 +28,13 @@ export const getAboutRemote = (containerID) => {
2928
payload: {}
3029
});
3130

32-
axiosInstance.post(urls.getAbout, {fs: remoteName})
31+
getRemoteInfo(remoteName)
3332
.then((res) => {
3433
dispatch({
3534
type: GET_REMOTE_ABOUT,
3635
status: REQUEST_SUCCESS,
3736
id: containerID,
38-
payload: res.data
37+
payload: res
3938
})
4039
}, (res) => {
4140
dispatch({

0 commit comments

Comments
 (0)
0