user UpdatedAt

This commit is contained in:
2023-05-16 01:51:41 +08:00
parent d328b31210
commit 248b90021b
14 changed files with 219 additions and 91 deletions

View File

@@ -8,7 +8,6 @@ import (
"main/models"
"main/utils"
"net/http"
"time"
"github.com/gorilla/mux"
)
@@ -74,7 +73,6 @@ func ImagesItemPatch(w http.ResponseWriter, r *http.Request) {
return
}
image.ID = utils.ParamInt(mux.Vars(r)["id"], 0)
image.UpdatedAt = time.Now().Format("2006-01-02 15:04:05")
if err := configs.ORMDB().Model(&image).Updates(image).Error; err != nil {
log.Println(err)
return