removed old functionality comments

This commit is contained in:
Joe Dowd 2020-10-01 00:53:13 +01:00
parent 4cea3c2a3b
commit fe91d13ff3
2 changed files with 0 additions and 17 deletions

View file

@ -20,10 +20,6 @@ module.exports = async function (req, res) {
// Get all video id's that match hash prefix
const videoIds = db.prepare('all', 'SELECT DISTINCT videoId, hashedVideoID from sponsorTimes WHERE hashedVideoID LIKE ?', [hashPrefix+'%']);
/*if (videoIds.length === 0) {
res.sendStatus(404);
return;
}*/
let segments = videoIds.map((video) => {
return {

View file

@ -40,18 +40,6 @@ describe('getSegmentsByHash', () => {
});
});
/*it('Should be able to get a 404 if no videos', (done) => {
request.get(utils.getbaseURL()
+ '/api/skipSegments/11111?categories=["shilling"]', null,
(err, res, body) => {
if (err) done("Couldn't call endpoint");
else if (res.statusCode !== 404) done("non 404 status code, was " + res.statusCode);
else {
done(); // pass
}
});
});*/
it('Should be able to get an emptry array if no videos', (done) => {
request.get(utils.getbaseURL()
+ '/api/skipSegments/11111?categories=["shilling"]', null,
@ -66,7 +54,6 @@ describe('getSegmentsByHash', () => {
});
});
it('Should return 400 prefix too short', (done) => {
request.get(utils.getbaseURL()
+ '/api/skipSegments/11?categories=["shilling"]', null,