Bump version to 1.0.21

This commit is contained in:
2026-07-09 15:18:05 -04:00
parent acd50ec9c0
commit 6c48031dd7
11 changed files with 726 additions and 2 deletions
+12
View File
@@ -2,6 +2,7 @@ package api
import (
"database/sql"
"encoding/json"
"log/slog"
"net/http"
"runtime/debug"
@@ -82,6 +83,17 @@ func NewServer(cfg *config.Config, db *sql.DB, engine *syncengine.Engine) *Serve
w.Write([]byte(pubKey))
})
r.With(auth.RequireAuth).Get("/settings/info", func(w http.ResponseWriter, r *http.Request) {
_, _, pubKey, _ := sshmanager.EnsureServerKey(cfg.SSHDir())
resp := SettingsInfoResponse{
Version: cfg.Version,
DataDir: cfg.DataDir,
SSHPubKey: pubKey,
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(resp)
})
r.With(auth.RequireAuth).Route("/ssh-keys", func(r chi.Router) {
r.Get("/", sshKeyHandler.List)
r.Post("/", sshKeyHandler.Create)