mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-13 06:57:05 +03:00
add istanbul exclusions
This commit is contained in:
@@ -23,6 +23,7 @@ export async function generateTokenRequest(req: GenerateTokenRequest, res: Respo
|
|||||||
if (type === TokenType.patreon || (type === TokenType.local && adminUserID === config.adminUserID)) {
|
if (type === TokenType.patreon || (type === TokenType.local && adminUserID === config.adminUserID)) {
|
||||||
const licenseKey = await createAndSaveToken(type, code);
|
const licenseKey = await createAndSaveToken(type, code);
|
||||||
|
|
||||||
|
/* istanbul ignore else */
|
||||||
if (licenseKey) {
|
if (licenseKey) {
|
||||||
return res.status(200).send(`
|
return res.status(200).send(`
|
||||||
<h1>
|
<h1>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ async function getFromITube (videoID: string): Promise<innerTubeVideoDetails> {
|
|||||||
const result = await axios.post(url, data, {
|
const result = await axios.post(url, data, {
|
||||||
timeout: 3500
|
timeout: 3500
|
||||||
});
|
});
|
||||||
|
/* istanbul ignore else */
|
||||||
if (result.status === 200) {
|
if (result.status === 200) {
|
||||||
return result.data.videoDetails;
|
return result.data.videoDetails;
|
||||||
} else {
|
} else {
|
||||||
@@ -39,6 +40,7 @@ export async function getPlayerData (videoID: string, ignoreCache = false): Prom
|
|||||||
return data as innerTubeVideoDetails;
|
return data as innerTubeVideoDetails;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
/* istanbul ignore next */
|
||||||
return Promise.reject(err);
|
return Promise.reject(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user