mirror of
https://github.com/knadh/listmonk.git
synced 2024-09-20 07:16:33 +08:00
Fix typo and formatting (#2028)
This commit is contained in:
parent
1819480153
commit
d7fe13c4b9
|
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"os"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/knadh/listmonk/internal/subimporter"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ 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 != "" {
|
||||
|
@ -163,7 +163,7 @@ func (e *Emailer) Push(m models.Message) error {
|
|||
em.Cc = append(em.Cc, strings.TrimSpace(part))
|
||||
}
|
||||
em.Headers.Del(hdrCc)
|
||||
}
|
||||
}
|
||||
|
||||
switch m.ContentType {
|
||||
case "plain":
|
||||
|
|
Loading…
Reference in a new issue