diff --git a/repositories/structs.go b/repositories/structs.go index 0dd975c..7f805a9 100644 --- a/repositories/structs.go +++ b/repositories/structs.go @@ -40,7 +40,7 @@ type File struct { // HTML Templates Structs // post-form.html -type HtmlFormErrors struct { +type Inputs struct { Title string Text string Files string @@ -51,7 +51,8 @@ type HtmlFormData struct { FirstPostID int CaptchaID string IsCaptchaActive bool - Errors HtmlFormErrors + Errors Inputs + Inputs } // index.html diff --git a/utils/utils.go b/utils/utils.go index e4b16ce..2a57e8b 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -101,8 +101,8 @@ func ValidatePost(title, text string, files []*multipart.FileHeader) string { return "" } -func ValidatePost2(title, text string, files []*multipart.FileHeader) *repositories.HtmlFormErrors { - validationError := new(repositories.HtmlFormErrors) +func ValidatePost2(title, text string, files []*multipart.FileHeader) *repositories.Inputs { + validationError := new(repositories.Inputs) hasErrors := false if text == "" && len(files) == 0 {