Skip to content

Commit

Permalink
lets try this again
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxBlaushild committed Sep 25, 2023
1 parent 4e11ece commit 88bfa8f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions modules/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package auth

import (
"fmt"
"sync"

"github.com/GoAdminGroup/go-admin/modules/db/dialect"
Expand Down Expand Up @@ -136,6 +137,10 @@ func (s *TokenService) AddToken() string {
// CheckToken check the given token with tokens in the CSRFToken, if exist
// return true.
func (s *TokenService) CheckToken(toCheckToken string) bool {
fmt.Println("TOCHECK")
fmt.Println(toCheckToken)
fmt.Println("ALLTOKENS")
fmt.Println(s.tokens)
for i := 0; i < len(s.tokens); i++ {
if (s.tokens)[i] == toCheckToken {
s.tokens = append((s.tokens)[:i], (s.tokens)[i+1:]...)
Expand Down
2 changes: 1 addition & 1 deletion modules/system/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package system

const version = "v1.2.24-tkhq1.0.3"
const version = "v1.2.24-tkhq1.0.4"

var requireThemeVersion = map[string][]string{
"adminlte": {">=v0.0.41"},
Expand Down
2 changes: 0 additions & 2 deletions plugins/admin/controller/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/GoAdminGroup/go-admin/plugins/admin/modules/table"
"github.com/GoAdminGroup/go-admin/template"
"github.com/GoAdminGroup/go-admin/template/types"
"github.com/davecgh/go-spew/spew"
)

// GlobalDeferHandler is a global error handler of admin plugin.
Expand All @@ -26,7 +25,6 @@ func (h *Handler) GlobalDeferHandler(ctx *context.Context) {
logger.Access(ctx)

fmt.Println("GLOBALDEFERHANDLER")
spew.Dump(ctx)

if !h.config.OperationLogOff {
h.RecordOperationLog(ctx)
Expand Down
1 change: 0 additions & 1 deletion plugins/admin/controller/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ func (h *Handler) showNewForm(ctx *context.Context, alert template2.HTML, prefix
// NewForm insert a table row into database.
func (h *Handler) NewForm(ctx *context.Context) {
fmt.Println("SHOWINGNEWFORM")
spew.Dump(ctx)

param := guard.GetNewFormParam(ctx)

Expand Down
1 change: 0 additions & 1 deletion plugins/admin/modules/guard/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,5 @@ func (g *Guard) NewForm(ctx *context.Context) {
func GetNewFormParam(ctx *context.Context) *NewFormParam {
fmt.Println("NEWFORMPARAM")
spew.Dump(ctx.UserValue[newFormParamKey])
spew.Dump(ctx)
return ctx.UserValue[newFormParamKey].(*NewFormParam)
}

0 comments on commit 88bfa8f

Please sign in to comment.