Skip to content

Commit d7fe13c

Browse files
authored
Fix typo and formatting (#2028)
1 parent 1819480 commit d7fe13c

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

cmd/handlers.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ func initHTTPHandlers(e *echo.Echo, app *App) {
7272
})
7373

7474
g.GET(path.Join(adminRoot, ""), handleAdminPage)
75-
g.GET(path.Join(adminRoot, "/custom.css"), serveCustomApperance("admin.custom_css"))
76-
g.GET(path.Join(adminRoot, "/custom.js"), serveCustomApperance("admin.custom_js"))
75+
g.GET(path.Join(adminRoot, "/custom.css"), serveCustomAppearance("admin.custom_css"))
76+
g.GET(path.Join(adminRoot, "/custom.js"), serveCustomAppearance("admin.custom_js"))
7777
g.GET(path.Join(adminRoot, "/*"), handleAdminPage)
7878

7979
// API endpoints.
@@ -210,8 +210,8 @@ func initHTTPHandlers(e *echo.Echo, app *App) {
210210
e.GET("/archive/latest", handleCampaignArchivePageLatest)
211211
}
212212

213-
e.GET("/public/custom.css", serveCustomApperance("public.custom_css"))
214-
e.GET("/public/custom.js", serveCustomApperance("public.custom_js"))
213+
e.GET("/public/custom.css", serveCustomAppearance("public.custom_css"))
214+
e.GET("/public/custom.js", serveCustomAppearance("public.custom_js"))
215215

216216
// Public health API endpoint.
217217
e.GET("/health", handleHealthCheck)
@@ -248,9 +248,9 @@ func handleHealthCheck(c echo.Context) error {
248248
return c.JSON(http.StatusOK, okResp{true})
249249
}
250250

251-
// serveCustomApperance serves the given custom CSS/JS appearance blob
251+
// serveCustomAppearance serves the given custom CSS/JS appearance blob
252252
// meant for customizing public and admin pages from the admin settings UI.
253-
func serveCustomApperance(name string) echo.HandlerFunc {
253+
func serveCustomAppearance(name string) echo.HandlerFunc {
254254
return func(c echo.Context) error {
255255
var (
256256
app = c.Get("app").(*App)

cmd/import.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package main
33
import (
44
"encoding/json"
55
"io"
6-
"os"
76
"net/http"
7+
"os"
88
"strings"
99

1010
"github.com/knadh/listmonk/internal/subimporter"

internal/core/bounces.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package core
22

33
import (
4-
"fmt"
54
"net/http"
65
"strings"
76

internal/messenger/email/email.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,15 @@ func (e *Emailer) Push(m models.Message) error {
155155
em.Bcc = append(em.Bcc, strings.TrimSpace(part))
156156
}
157157
em.Headers.Del(hdrBcc)
158-
}
158+
}
159159

160160
// If the `Cc` header is set, it should be set on the Envelope
161161
if cc := em.Headers.Get(hdrCc); cc != "" {
162162
for _, part := range strings.Split(cc, ",") {
163163
em.Cc = append(em.Cc, strings.TrimSpace(part))
164164
}
165165
em.Headers.Del(hdrCc)
166-
}
166+
}
167167

168168
switch m.ContentType {
169169
case "plain":

0 commit comments

Comments
 (0)