mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
24 lines
491 B
Go
24 lines
491 B
Go
package v2
|
|
|
|
import (
|
|
_ "embed"
|
|
"net/http"
|
|
|
|
"github.com/formancehq/ledger/internal/api/backend"
|
|
sharedapi "github.com/formancehq/stack/libs/go-libs/api"
|
|
)
|
|
|
|
type ConfigInfo struct {
|
|
Server string `json:"server"`
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
func getInfo(backend backend.Backend) func(w http.ResponseWriter, r *http.Request) {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
sharedapi.RawOk(w, ConfigInfo{
|
|
Server: "ledger",
|
|
Version: backend.GetVersion(),
|
|
})
|
|
}
|
|
}
|