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

@@ -10,7 +10,6 @@ import (
"main/utils"
"net/http"
"strconv"
"time"
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
@@ -144,9 +143,6 @@ func ModelItemPatch(w http.ResponseWriter, r *http.Request) {
model.Image = model_new.Image
}
// 更新時間
model.UpdatedAt = time.Now().Format("2006-01-02 15:04:05")
// 執行更新
if err := configs.ORMDB().Save(&model).Error; err != nil {
log.Println(err)