Skip to content

Commit

Permalink
Remove unused umbrella code and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mikogs committed Dec 27, 2024
1 parent 74991b1 commit d48b402
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions internal_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit d48b402

Please sign in to comment.