mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 19:53:21 +02:00
clean: made pageError struct type
This commit is contained in:
+6
-5
@@ -11,15 +11,16 @@ import (
|
||||
const LoginRoute = "/login"
|
||||
|
||||
type LoginPage struct {
|
||||
IsError bool `json:"isError"`
|
||||
Error string `json:"error"`
|
||||
Username string `json:"username"`
|
||||
PageError *PageError `json:"error"`
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
func NewLoginPage(error string, username string) *LoginPage {
|
||||
return &LoginPage{
|
||||
IsError: strings.Compare(error, "") != 0,
|
||||
Error: error,
|
||||
PageError: &PageError{
|
||||
IsError: strings.Compare(error, "") != 0,
|
||||
Message: error,
|
||||
},
|
||||
Username: username,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user