web interfaces: don't include version number in html, only return it after authentication

second round for issue #322
This commit is contained in:
Mechiel Lukkien
2025-03-29 20:46:53 +01:00
parent eeeabdc6de
commit 3a3a11560e
18 changed files with 217 additions and 35 deletions

View File

@ -27,6 +27,7 @@ import (
"os"
"path/filepath"
"reflect"
"runtime"
"runtime/debug"
"slices"
"sort"
@ -279,6 +280,11 @@ func (w Admin) Logout(ctx context.Context) {
xcheckf(ctx, err, "logout")
}
// Version returns the version, goos and goarch.
func (w Admin) Version(ctx context.Context) (version, goos, goarch string) {
return moxvar.Version, runtime.GOOS, runtime.GOARCH
}
type Result struct {
Errors []string
Warnings []string