Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Removed unused syscall in `/about` API. Closes #1421, closes #1422.

Kailash Nadhdcb87a39b7cf
diff --git a/cmd/settings.go b/cmd/settings.go
index 817db913..0eb09938 100644
--- a/cmd/settings.go
+++ b/cmd/settings.go
@@ -2,7 +2,6 @@ package main
import (
"bytes"
- "fmt"
"io/ioutil"
"net/http"
"regexp"
@@ -295,19 +294,13 @@ func handleTestSMTPSettings(c echo.Context) error {
}
func handleGetAboutInfo(c echo.Context) error {
- app := c.Get("app").(*App)
-
var (
- mem runtime.MemStats
- utsname syscall.Utsname
+ app = c.Get("app").(*App)
+ mem runtime.MemStats
)
runtime.ReadMemStats(&mem)
- if err := syscall.Uname(&utsname); err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, fmt.Errorf("error getting system info: %v", err))
- }
-
out := app.about
out.System.AllocMB = mem.Alloc / 1024 / 1024
out.System.OSMB = mem.Sys / 1024 / 1024