Skip to content

Commit d356512

Browse files
committed
Add endpoint for transferred stats
1 parent 571e8a5 commit d356512

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/endpoint.js

+5
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,10 @@ const urls = {
126126
* Executes rclone in a seperate process for output
127127
*/
128128
coreCommand: "core/command",
129+
130+
/**
131+
* Transferred jobs for rclone.
132+
*/
133+
transferred: 'core/transferred',
129134
};
130135
export default urls;

src/index.js

+15
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,18 @@ export const coreCommand = ( arg, opt) => {
345345
})
346346
});
347347
}
348+
349+
350+
/**
351+
* getTransferredStats returns transferred job stats.
352+
* @returns {Promise<unknown>}
353+
*/
354+
export const getTransferredStats = () => {
355+
return new Promise((resolve, reject) => {
356+
axiosInstance.post(urls.transferred).then(res => {
357+
resolve(res.data);
358+
}, error => {
359+
reject(error);
360+
})
361+
})
362+
}

0 commit comments

Comments
 (0)