|
1 | | -import {axiosInstance} from "./axiosInstance"; |
2 | | -import urls from "./endpoint"; |
3 | | -import {addColonAtLast, isLocalRemoteName} from "./Tools"; |
| 1 | +const axiosInstance = require('./axiosInstance'); |
| 2 | +const urls = require('./endpoint'); |
| 3 | +const tools = require('./Tools') |
4 | 4 |
|
5 | 5 | /** |
6 | 6 | * getStats returns the current rclone stats. |
@@ -52,7 +52,7 @@ export const setCurrentBandwidthSetting = (newRate) => { |
52 | 52 | * @returns {Function} |
53 | 53 | */ |
54 | 54 | export const createNewPublicLink = (remoteName, remotePath) => { |
55 | | - remoteName = addColonAtLast(remoteName); |
| 55 | + remoteName = tools.addColonAtLast(remoteName); |
56 | 56 | return new Promise((resolve, reject) => { |
57 | 57 | axiosInstance.post(urls.createPublicLink, {fs: remoteName, remote: remotePath}).then(res => { |
58 | 58 | resolve(res.data); |
@@ -209,8 +209,9 @@ export const getJobStatus = (jobId) => { |
209 | 209 | } |
210 | 210 |
|
211 | 211 | /** |
212 | | - * purgeDir returns the status of a job with jobId |
213 | | - * @param jobId {number} Valid job id |
| 212 | + * purgeDir deletes the directory with given fs and remote |
| 213 | + * @param fs {string} Name of fs |
| 214 | + * @param remote {string} path remoteName |
214 | 215 | * @return {Promise<unknown>} |
215 | 216 | */ |
216 | 217 | export const purgeDir = (fs , remote) => { |
@@ -248,7 +249,7 @@ export const deleteFile = (fs , remote) => { |
248 | 249 | } |
249 | 250 |
|
250 | 251 | /** |
251 | | - * cleanTrashForRemote returns the status of a job with jobId |
| 252 | + * cleanTrashForRemote cleans the trash for the remote with remote fs |
252 | 253 | * @param fs {string} Remote Name |
253 | 254 | * @return {Promise<unknown>} |
254 | 255 | */ |
|
0 commit comments