Add suggested chapter names

This commit is contained in:
Ajay Ramachandran
2021-11-06 22:43:03 -04:00
parent c371d35e82
commit 6919b5433b
5 changed files with 117 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ import { getUserStats } from "./routes/getUserStats";
import ExpressPromiseRouter from "express-promise-router";
import { Server } from "http";
import { youtubeApiProxy } from "./routes/youtubeApiProxy";
import { getChapterNames } from "./routes/getChapterNames";
export function createServer(callback: () => void): Server {
// Create a service (the app object is just a callback).
@@ -172,6 +173,9 @@ function setupRoutes(router: Router) {
// get all segments that match a search
router.get("/api/searchSegments", getSearchSegments);
// autocomplete chapter names
router.get("/api/chapterNames", getChapterNames);
// get status
router.get("/api/status/:value", getStatus);
router.get("/api/status", getStatus);