|
|
@@ -189,10 +189,10 @@ router.get('/books/:id', optionalAuth, async (ctx: Context) => {
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
- * PUT /api/book-generator/books/:id
|
|
|
+ * POST /api/book-generator/books/:id
|
|
|
* 更新书籍(书名、描述等)
|
|
|
*/
|
|
|
-router.put('/books/:id', optionalAuth, async (ctx: Context) => {
|
|
|
+router.post('/books/:id', optionalAuth, async (ctx: Context) => {
|
|
|
try {
|
|
|
const bookId = parseInt(ctx.params.id as string);
|
|
|
const body = ctx.request.body as {
|