From 1bcbed68287a54ef46e0dc5db855df88f7aea853 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 13 May 2025 17:35:54 +0000 Subject: [PATCH] minor code formatting to login.go --- app/routes/login.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/routes/login.go b/app/routes/login.go index 6a8035a..9e27116 100644 --- a/app/routes/login.go +++ b/app/routes/login.go @@ -9,6 +9,18 @@ import ( "github.com/go-viper/mapstructure/v2" ) +// used when requesting GET /access/domains +type GetRealmsBody struct { + Data []Realm `json:"data"` +} + +// stores each realm's data +type Realm struct { + Default int `json:"default"` + Realm string `json:"realm"` + Comment string `json:"comment"` +} + func GetLoginRealms() ([]Realm, error) { realms := []Realm{} @@ -37,18 +49,6 @@ func GetLoginRealms() ([]Realm, error) { return realms, nil } -// used when requesting GET /access/domains -type GetRealmsBody struct { - Data []Realm `json:"data"` -} - -// stores each realm's data -type Realm struct { - Default int `json:"default"` - Realm string `json:"realm"` - Comment string `json:"comment"` -} - func HandleGETLogin(c *gin.Context) { realms, err := GetLoginRealms() if err != nil {