mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
formatting
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@ import (
|
||||
"github.com/swiftyos/market/models"
|
||||
)
|
||||
|
||||
|
||||
|
||||
func requireAdminUser() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
user, exists := c.Get("user")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user