8000 Add api for stopJob · lwsyes/rclone-js-api@f589327 · GitHub
[go: up one dir, main page]

Skip to content

Commit f589327

Browse files
committed
Add api for stopJob
1 parent a74a481 commit f589327

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/index.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,20 @@ export const coreCommand = ( arg, opt) => {
374374
})
375375
}
376376

377+
378+
/**
379+
* stopJob stops a job with the specified jobId.
< 9161 /code>
380+
* @returns {Promise<unknown>}
381+
*/
382+
export const stopJob = (jobId) => {
383+
let data = {};
384+
if (jobId) {
385+
data = {
386+
jobid: jobId,
387+
};
388+
};
377389
return new Promise((resolve, reject) => {
378-
axiosInstance.post(urls.transferred).then(res => {
390+
axiosInstance.post(urls.stopJob, data).then(res => {
379391
resolve(res.data);
380392
}, error => {
381393
reject(error);

0 commit comments

Comments
 (0)
0