user UpdatedAt
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user