mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-09 21:17:15 +03:00
Add endpoint to submit unlisted videos
A temporary measure which will be removed next month https://support.google.com/youtube/answer/9230970
This commit is contained in:
@@ -30,6 +30,7 @@ import {rateLimitMiddleware} from './middleware/requestRateLimit';
|
||||
import dumpDatabase, {redirectLink} from './routes/dumpDatabase';
|
||||
import {endpoint as getSegmentInfo} from './routes/getSegmentInfo';
|
||||
import {postClearCache} from './routes/postClearCache';
|
||||
import { addUnlistedVideo } from './routes/addUnlistedVideo';
|
||||
|
||||
export function createServer(callback: () => void) {
|
||||
// Create a service (the app object is just a callback).
|
||||
@@ -140,6 +141,8 @@ function setupRoutes(app: Express) {
|
||||
//clear cache as VIP
|
||||
app.post('/api/clearCache', postClearCache)
|
||||
|
||||
app.post('/api/unlistedVideo', addUnlistedVideo)
|
||||
|
||||
if (config.postgres) {
|
||||
app.get('/database', (req, res) => dumpDatabase(req, res, true));
|
||||
app.get('/database.json', (req, res) => dumpDatabase(req, res, false));
|
||||
|
||||
Reference in New Issue
Block a user