sync: soul-api 接口逻辑 | 原因: 后端接口逻辑修改
This commit is contained in:
@@ -441,6 +441,9 @@ func DBBookAction(c *gin.Context) {
|
|||||||
if body.EditionPremium != nil {
|
if body.EditionPremium != nil {
|
||||||
updates["edition_premium"] = *body.EditionPremium
|
updates["edition_premium"] = *body.EditionPremium
|
||||||
}
|
}
|
||||||
|
if body.HotScore != nil {
|
||||||
|
updates["hot_score_override"] = *body.HotScore
|
||||||
|
}
|
||||||
err := db.Model(&model.Chapter{}).Where("id = ?", body.ID).Updates(updates).Error
|
err := db.Model(&model.Chapter{}).Where("id = ?", body.ID).Updates(updates).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.JSON(http.StatusOK, gin.H{"success": false, "error": err.Error()})
|
c.JSON(http.StatusOK, gin.H{"success": false, "error": err.Error()})
|
||||||
|
|||||||
Reference in New Issue
Block a user