formatting

This commit is contained in:
SwiftyOS
2024-09-13 19:04:36 +02:00
parent c2843eecfa
commit 55eb917162
3 changed files with 5 additions and 9 deletions

View File

@@ -8,11 +8,11 @@ import (
)
type Config struct {
ServerAddress string `mapstructure:"serveraddress"`
DatabaseURL string `mapstructure:"databaseurl"`
AuthEnabled bool `mapstructure:"authenabled"`
JWTSecret string `mapstructure:"jwtsecret"`
JWTAlgorithm string `mapstructure:"jwtalgorithm"`
ServerAddress string `mapstructure:"serveraddress"`
DatabaseURL string `mapstructure:"databaseurl"`
AuthEnabled bool `mapstructure:"authenabled"`
JWTSecret string `mapstructure:"jwtsecret"`
JWTAlgorithm string `mapstructure:"jwtalgorithm"`
CORSAllowOrigins []string `mapstructure:"corsalloworigins"`
}

View File

@@ -10,8 +10,6 @@ import (
"github.com/swiftyos/market/models"
)
func requireAdminUser() gin.HandlerFunc {
return func(c *gin.Context) {
user, exists := c.Get("user")

View File

@@ -15,8 +15,6 @@ func TestGetPageFromContext_ValidPage(t *testing.T) {
assert.Equal(t, 5, result)
}
func TestGetPageFromContext_InvalidPageZero(t *testing.T) {
ctx := context.WithValue(context.Background(), pageKey, 0)
result := getPageFromContext(ctx)