Skip to content

Commit 6e3e6cf

Browse files
committed
创建图书章节时,增加用户ID
1 parent 24d202c commit 6e3e6cf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

controller/book/book.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ func CreateChapter(c *gin.Context) {
582582
}
583583

584584
chapter.ContentType = book.ContentType
585+
chapter.UserID = user.ID
585586

586587
if err := model.DB.Create(&chapter).Error; err != nil {
587588
SendErrJSON("error", c)

0 commit comments

Comments
 (0)