debug
This commit is contained in:
@@ -107,7 +107,7 @@ func SessionsItemGet(w http.ResponseWriter, r *http.Request) {
|
||||
// 更新會話
|
||||
func SessionsItemPatch(w http.ResponseWriter, r *http.Request) {
|
||||
session := models.Session{ID: mux.Vars(r)["session_id"]}
|
||||
if err := configs.ORMDB().Model(&session).Updates(GetForm(r)); err != nil {
|
||||
if err := configs.ORMDB().Model(&session).Updates(GetForm(r)).Error; err != nil {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
w.Write([]byte("404 - Not Found"))
|
||||
return
|
||||
|
Reference in New Issue
Block a user