Kaynağa Gözat

fix: 更新书籍接口从 PUT 改为 POST,与前端 post() 调用一致

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
MyFramework User 3 ay önce
ebeveyn
işleme
937e13aecd

+ 2 - 2
server/src/modules/book-generator/album-controller.ts

@@ -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 {