Skip to content

Commit

Permalink
Fix typo and formatting (#2028)
Browse files Browse the repository at this point in the history
  • Loading branch information
vnoitkumar authored Aug 30, 2024
1 parent 1819480 commit d7fe13c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
12 changes: 6 additions & 6 deletions cmd/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ func initHTTPHandlers(e *echo.Echo, app *App) {
})

g.GET(path.Join(adminRoot, ""), handleAdminPage)
g.GET(path.Join(adminRoot, "/custom.css"), serveCustomApperance("admin.custom_css"))
g.GET(path.Join(adminRoot, "/custom.js"), serveCustomApperance("admin.custom_js"))
g.GET(path.Join(adminRoot, "/custom.css"), serveCustomAppearance("admin.custom_css"))
g.GET(path.Join(adminRoot, "/custom.js"), serveCustomAppearance("admin.custom_js"))
g.GET(path.Join(adminRoot, "/*"), handleAdminPage)

// API endpoints.
Expand Down Expand Up @@ -210,8 +210,8 @@ func initHTTPHandlers(e *echo.Echo, app *App) {
e.GET("/archive/latest", handleCampaignArchivePageLatest)
}

e.GET("/public/custom.css", serveCustomApperance("public.custom_css"))
e.GET("/public/custom.js", serveCustomApperance("public.custom_js"))
e.GET("/public/custom.css", serveCustomAppearance("public.custom_css"))
e.GET("/public/custom.js", serveCustomAppearance("public.custom_js"))

// Public health API endpoint.
e.GET("/health", handleHealthCheck)
Expand Down Expand Up @@ -248,9 +248,9 @@ func handleHealthCheck(c echo.Context) error {
return c.JSON(http.StatusOK, okResp{true})
}

// serveCustomApperance serves the given custom CSS/JS appearance blob
// serveCustomAppearance serves the given custom CSS/JS appearance blob
// meant for customizing public and admin pages from the admin settings UI.
func serveCustomApperance(name string) echo.HandlerFunc {
func serveCustomAppearance(name string) echo.HandlerFunc {
return func(c echo.Context) error {
var (
app = c.Get("app").(*App)
Expand Down
2 changes: 1 addition & 1 deletion cmd/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"encoding/json"
"io"
"os"
"net/http"
"os"
"strings"

"github.com/knadh/listmonk/internal/subimporter"
Expand Down
1 change: 0 additions & 1 deletion internal/core/bounces.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package core

import (
"fmt"
"net/http"
"strings"

Expand Down
4 changes: 2 additions & 2 deletions internal/messenger/email/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ func (e *Emailer) Push(m models.Message) error {
em.Bcc = append(em.Bcc, strings.TrimSpace(part))
}
em.Headers.Del(hdrBcc)
}
}

// If the `Cc` header is set, it should be set on the Envelope
if cc := em.Headers.Get(hdrCc); cc != "" {
for _, part := range strings.Split(cc, ",") {
em.Cc = append(em.Cc, strings.TrimSpace(part))
}
em.Headers.Del(hdrCc)
}
}

switch m.ContentType {
case "plain":
Expand Down

0 comments on commit d7fe13c

Please sign in to comment.