Add purge all segments of VideoId

This commit is contained in:
Haidang666
2021-06-24 12:27:21 +07:00
parent f71cd57bc7
commit 9b43ce0ab7
3 changed files with 127 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ import dumpDatabase, {redirectLink} from './routes/dumpDatabase';
import {endpoint as getSegmentInfo} from './routes/getSegmentInfo';
import {postClearCache} from './routes/postClearCache';
import { addUnlistedVideo } from './routes/addUnlistedVideo';
import {postPurgeAllSegments} from './routes/postPurgeAllSegments';
export function createServer(callback: () => void) {
// Create a service (the app object is just a callback).
@@ -139,7 +140,7 @@ function setupRoutes(app: Express) {
app.get('/api/segmentInfo', getSegmentInfo);
//clear cache as VIP
app.post('/api/clearCache', postClearCache)
app.post('/api/clearCache', postClearCache);
app.post('/api/unlistedVideo', addUnlistedVideo)
@@ -152,4 +153,7 @@ function setupRoutes(app: Express) {
res.sendFile("./databases/sponsorTimes.db", {root: "./"});
});
}
//purge all segments for VIP
app.post('/api/purgeAllSegments', postPurgeAllSegments);
}