From f8691eb1809ca61deb99759f0b6ec644596db410 Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Tue, 14 Jan 2025 21:48:09 +0100 Subject: [PATCH] Cleanup --- cmd/frontend/articles.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/frontend/articles.go b/cmd/frontend/articles.go index d88bf33..8f6edd8 100644 --- a/cmd/frontend/articles.go +++ b/cmd/frontend/articles.go @@ -53,14 +53,14 @@ func WriteArticle(c *b.Config, db *b.DB, s map[string]*Session) http.HandlerFunc return } - data := &EditorHTMLData{Action: "submit", ArticleUsers: make(map[string]*ArticleUser)} - users, err := db.GetAllUsers(c) if err != nil { log.Println(err) http.Error(w, err.Error(), http.StatusInternalServerError) return } + + data := &EditorHTMLData{Action: "submit", ArticleUsers: make(map[string]*ArticleUser)} for _, user := range users { data.ArticleUsers[fmt.Sprint(user.LastName, user.FirstName, user.ID)] = &ArticleUser{User: user, ArticleRole: None} }