修复模型更新问题
This commit is contained in:
parent
4ca7f69253
commit
8a6949c5fd
|
|
@ -61,7 +61,7 @@ func DeleteModelByID(id int) error {
|
|||
|
||||
// 根据id更新模型
|
||||
func UpdateModelByID(id int, userID uint, modelType, url, parameter, description string) error {
|
||||
model := Model{UserID: userID, Type: modelType, Url: url, Parameter: parameter}
|
||||
model := Model{UserID: userID, Type: modelType, Url: url, Parameter: parameter, Description: description}
|
||||
var res *gorm.DB
|
||||
if proto.Config.SERVER_SQL_LOG {
|
||||
res = DB.Debug().Model(&Model{}).Where("id = ?", id).Updates(&model)
|
||||
|
|
|
|||
Loading…
Reference in New Issue