server: migrate checkHash to clientGatewayService

This commit is contained in:
Jesse Chan
2020-09-29 12:28:54 +08:00
parent 97ead47fe9
commit 69276b5fa4
7 changed files with 90 additions and 42 deletions
-11
View File
@@ -85,17 +85,6 @@ const client = {
settings.set(user, {id: 'startTorrentsOnLoad', data: start});
},
checkHash(user, services, {hashes}, callback) {
const request = new ClientRequest(user, services);
request.checkHash(hashes);
request.onComplete((response, error) => {
services.torrentService.fetchTorrentList();
callback(response, error);
});
request.send();
},
downloadFiles(user, services, hash, fileString, res) {
try {
const selectedTorrent = services.torrentService.getTorrent(hash);