Skip to content

Commit 42f9e0a

Browse files
committed
fix: 更新题库的时候重新计算hash值
1 parent 65ea9c3 commit 42f9e0a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/controller/tiku.go

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ func UpdateQuestions(c *gin.Context) {
106106
// 找到旧答案
107107
oldTiku, err := dao.Tiku.Where(dao.Tiku.ID.Eq(int32(id))).First()
108108

109+
middleware.FillHash(tiku) // 更新题库的时候重新计算hash值
109110
updates, err := dao.Tiku.Where(dao.Tiku.ID.Eq(int32(id))).Updates(tiku)
110111
if err != nil {
111112
c.JSON(500, gin.H{

0 commit comments

Comments
 (0)