feature(cloudcmd) IO.cp -> IO.copy

This commit is contained in:
coderaiser 2020-08-14 17:13:27 +03:00
parent 13307f3861
commit 5041930685
9 changed files with 48 additions and 11 deletions

View file

@ -62,11 +62,15 @@ module.exports.read = async (url, dataType = 'text') => {
});
};
module.exports.cp = async (data) => {
module.exports.copy = async (from, to, names) => {
return await sendRequest({
method: 'PUT',
url: '/cp',
data,
url: '/copy',
data: {
from,
to,
names,
},
imgPosition,
});
};

View file

@ -26,7 +26,7 @@ module.exports.delete = handleError(IO.delete);
module.exports.patch = handleError(IO.patch);
module.exports.write = handleError(IO.write);
module.exports.read = handleError(IO.read);
module.exports.cp = handleError(IO.cp);
module.exports.copy = handleError(IO.copy);
module.exports.pack = handleError(IO.pack);
module.exports.extract = handleError(IO.extract);
module.exports.move = handleError(IO.move);