|
@@ -102,6 +102,11 @@ func UpdateCraft(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
if craft.Id.Hex() == "" {
|
|
|
return nil, errors.New("id的为空")
|
|
|
}
|
|
|
+
|
|
|
+ // if remark = ""
|
|
|
+ if craft.Remark == "" {
|
|
|
+ craft.Remark = " "
|
|
|
+ }
|
|
|
craft.UpdateTime = time.Now()
|
|
|
return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionCraft, craft.Id.Hex(), &craft)
|
|
|
}
|