🐛 Bug fixes on settings auth preferences
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user