add logs for updating database failed

This commit is contained in:
RockYang
2024-05-21 11:55:38 +08:00
parent 00d31a2379
commit bee19392c1
17 changed files with 41 additions and 7 deletions

View File

@@ -8,6 +8,8 @@ package handler
// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
import (
"encoding/base64"
"fmt"
"geekai/core"
"geekai/core/types"
"geekai/service"
@@ -17,8 +19,6 @@ import (
"geekai/store/vo"
"geekai/utils"
"geekai/utils/resp"
"encoding/base64"
"fmt"
"net/http"
"strings"
"time"
@@ -511,6 +511,7 @@ func (h *MidJourneyHandler) Publish(c *gin.Context) {
res := h.DB.Model(&model.MidJourneyJob{Id: data.Id}).UpdateColumn("publish", data.Action)
if res.Error != nil {
logger.Error("error with update database", res.Error)
resp.ERROR(c, "更新数据库失败")
return
}