From d48b4021523db3ff93f11b838f34b4da5c72f661 Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Fri, 27 Dec 2024 23:39:29 +0100 Subject: [PATCH] Remove unused umbrella code and comments --- http.go | 2 -- internal_http.go | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/http.go b/http.go index 0bb64c3..1ae3357 100644 --- a/http.go +++ b/http.go @@ -14,8 +14,6 @@ type HandlerOptions struct { } // Values for CRUD operations -// Same as in the "umbrella" package: http://github.com/mikolajgs/prototyping/pkg/umbrella -// refactor: work on these guys to be different? const OpAll = 0 const OpRead = 16 const OpUpdate = 32 diff --git a/internal_http.go b/internal_http.go index 3352af5..bd0b428 100644 --- a/internal_http.go +++ b/internal_http.go @@ -73,16 +73,6 @@ func (c Controller) handleHTTPPut(w http.ResponseWriter, r *http.Request, newObj return } - // refactor: fix this by checking if ModifiedAt and ModifiedBy fields exist - // refactor: also, do the login stuff just like in the ui without umbrella here - /*opts := stdb.SaveOptions{} - userId := r.Context().Value(umbrella.UmbrellaContextValue("UmbrellaUserID")) - rk := reflect.ValueOf(userId).Kind() - if rk == reflect.Int64 && userId.(int64) != 0 { - opts.ModifiedBy = userId.(int64) - opts.ModifiedAt = time.Now().Unix() - }*/ - err2 := c.orm.Save(objClone) if err2 != nil { c.writeErrText(w, http.StatusInternalServerError, "cannot_save_to_db")