|
@@ -37,9 +37,8 @@ async function getAlbums(ctx: Context) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// GET /api/book-generator/books 和 /albums
|
|
|
|
|
|
|
+// GET /api/book-generator/books
|
|
|
router.get('/books', getAlbums);
|
|
router.get('/books', getAlbums);
|
|
|
-router.get('/albums', getAlbums);
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* GET /api/book-generator/list
|
|
* GET /api/book-generator/list
|
|
@@ -143,9 +142,8 @@ async function createAlbum(ctx: Context) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// POST /api/book-generator/books 和 /albums
|
|
|
|
|
|
|
+// POST /api/book-generator/books
|
|
|
router.post('/books', createAlbum);
|
|
router.post('/books', createAlbum);
|
|
|
-router.post('/albums', createAlbum);
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* GET /api/book-generator/books/:id
|
|
* GET /api/book-generator/books/:id
|
|
@@ -366,9 +364,8 @@ async function getChapters(ctx: Context) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// GET /api/book-generator/books/:id/chapters 和 /albums/:id/chapters
|
|
|
|
|
|
|
+// GET /api/book-generator/books/:id/chapters
|
|
|
router.get('/books/:id/chapters', optionalAuth, getChapters);
|
|
router.get('/books/:id/chapters', optionalAuth, getChapters);
|
|
|
-router.get('/albums/:id/chapters', optionalAuth, getChapters);
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* POST /api/book-generator/books/:id/chapters/:chapterId/merge-audio
|
|
* POST /api/book-generator/books/:id/chapters/:chapterId/merge-audio
|
|
@@ -500,8 +497,7 @@ async function getChapterDetail(ctx: Context) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// GET /api/book-generator/books/chapters/:id 和 /albums/chapters/:id
|
|
|
|
|
|
|
+// GET /api/book-generator/books/chapters/:id
|
|
|
router.get('/books/chapters/:id', optionalAuth, getChapterDetail);
|
|
router.get('/books/chapters/:id', optionalAuth, getChapterDetail);
|
|
|
-router.get('/albums/chapters/:id', optionalAuth, getChapterDetail);
|
|
|
|
|
|
|
|
|
|
export default router;
|
|
export default router;
|