3
0

Remove spew.Dump() artefacts

This commit is contained in:
Denis Arh 2019-03-01 20:20:13 +01:00
parent 8dc5d0c703
commit 24ff7d4289
2 changed files with 0 additions and 6 deletions

View File

@ -6,8 +6,6 @@ import (
"net/url"
"time"
"github.com/davecgh/go-spew/spew"
"github.com/crusttech/crust/crm/rest/handlers"
"github.com/crusttech/crust/crm/service"
"github.com/crusttech/crust/crm/types"
@ -60,7 +58,6 @@ func loadAttachedFile(svc service.AttachmentService, ID uint64, preview, downloa
} else {
rval.Attachment = att
if preview {
spew.Dump(att)
rval.content, err = svc.OpenPreview(att)
} else {
rval.content, err = svc.OpenOriginal(att)

View File

@ -9,7 +9,6 @@ import (
"strings"
"time"
"github.com/davecgh/go-spew/spew"
"github.com/go-chi/chi"
"github.com/gorilla/sessions"
"github.com/markbates/goth"
@ -90,7 +89,6 @@ func (ctrl *Social) MountRoutes(r chi.Router) {
// Always set redir cookie, even if not requested. If param is empty, cookie is removed
ctrl.setCookie(w, r, "redir", r.URL.Query().Get("redir"))
spew.Dump("REDIR=" + r.URL.Query().Get("redir"))
// try to get the user without re-authenticating
if user, err := gothic.CompleteUserAuth(w, r); err != nil {
@ -149,7 +147,6 @@ func (ctrl *Social) handleSuccessfulAuth(w http.ResponseWriter, r *http.Request,
ctrl.jwtEncoder.SetCookie(w, r, u)
if c, err := r.Cookie("redir"); c != nil && err == nil {
spew.Dump("REDIR=" + c.Value)
ctrl.setCookie(w, r, "redir", "")
w.Header().Set("Location", c.Value)
w.WriteHeader(http.StatusSeeOther)