Работа над BookUpdateChecker

This commit is contained in:
Book Pauk
2022-07-26 20:37:49 +07:00
parent 08d0d3e7f3
commit a3541ec16a
4 changed files with 25 additions and 2 deletions

View File

@@ -229,6 +229,17 @@ class Reader {
return (await axios.get(url)).data;
}
async checkBuc(bookUrls) {
const response = await wsc.message(await wsc.send({action: 'check-buc', bookUrls}));
if (response.error)
throw new Error(response.error);
if (!response.data)
throw new Error(`response.data is empty`);
return response.data;
}
}
export default new Reader();