🐛 Bug fixes on settings auth preferences
This commit is contained in:
parent
68b4390edf
commit
06bd632f37
8
.idea/workspace.xml
generated
8
.idea/workspace.xml
generated
@ -4,10 +4,10 @@
|
||||
<option name="autoReloadType" value="ALL" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":recycle: Improve notifications mark read system">
|
||||
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Bug fixes on multi-factors based authentication">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/models/auth.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/models/auth.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/services/ticket.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/ticket.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/server/api/preferences_api.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/api/preferences_api.go" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@ -154,7 +154,6 @@
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value=":bug: Fix compare perm node panic" />
|
||||
<MESSAGE value=":bug: Fix compare perm node function" />
|
||||
<MESSAGE value=":sparkles: Bot related bot key apis" />
|
||||
<MESSAGE value=":bug: Fix bot related bot key apis path error" />
|
||||
@ -179,7 +178,8 @@
|
||||
<MESSAGE value=":bug: Trying to prevent send same notification to the same user in batch" />
|
||||
<MESSAGE value=":sparkles: Allow user view and remove notification subscriptions" />
|
||||
<MESSAGE value=":recycle: Improve notifications mark read system" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value=":recycle: Improve notifications mark read system" />
|
||||
<MESSAGE value=":bug: Bug fixes on multi-factors based authentication" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value=":bug: Bug fixes on multi-factors based authentication" />
|
||||
</component>
|
||||
<component name="VgoProject">
|
||||
<settings-migrated>true</settings-migrated>
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type AuthConfig struct {
|
||||
MaximumAuthSteps int `json:"maximum_auth_steps"`
|
||||
MaximumAuthSteps int `json:"maximum_auth_steps" validate:"required,min=1,max=99"`
|
||||
}
|
||||
|
||||
type AuthFactorType = int8
|
||||
|
@ -18,7 +18,7 @@ func getAuthPreference(c *fiber.Ctx) error {
|
||||
return fiber.NewError(fiber.StatusNotFound, err.Error())
|
||||
}
|
||||
|
||||
return c.JSON(cfg.Config)
|
||||
return c.JSON(cfg.Config.Data())
|
||||
}
|
||||
|
||||
func updateAuthPreference(c *fiber.Ctx) error {
|
||||
@ -37,7 +37,7 @@ func updateAuthPreference(c *fiber.Ctx) error {
|
||||
return fiber.NewError(fiber.StatusBadRequest, err.Error())
|
||||
}
|
||||
|
||||
return c.JSON(cfg.Config)
|
||||
return c.JSON(cfg.Config.Data())
|
||||
}
|
||||
|
||||
func getNotificationPreference(c *fiber.Ctx) error {
|
||||
|
Loading…
Reference in New Issue
Block a user