Skip to content

Commit

Permalink
Advertise product in capabilities, version and status
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Mar 15, 2022
1 parent 43f3c7e commit f5f0c13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/http/services/owncloud/ocdav/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func (s *svc) doStatus(w http.ResponseWriter, r *http.Request) {
VersionString: "10.0.11",
Edition: "community",
ProductName: "reva",
Product: "reva",
}

statusJSON, err := json.MarshalIndent(status, "", " ")
Expand Down
1 change: 1 addition & 0 deletions internal/http/services/owncloud/ocs/data/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ type Status struct {
VersionString string `json:"versionstring" xml:"versionstring"`
Edition string `json:"edition" xml:"edition"`
ProductName string `json:"productname" xml:"productname"`
Product string `json:"product" xml:"product"`
Hostname string `json:"hostname,omitempty" xml:"hostname,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ func (h *Handler) Init(c *config.Config) {
if h.c.Capabilities.Core.Status.ProductName == "" {
h.c.Capabilities.Core.Status.ProductName = "reva" // TODO make build determined
}
if h.c.Capabilities.Core.Status.Product == "" {
h.c.Capabilities.Core.Status.Product = "reva" // TODO make build determined
}
if h.c.Capabilities.Core.Status.Hostname == "" {
h.c.Capabilities.Core.Status.Hostname = "" // TODO get from context?
}
Expand Down Expand Up @@ -216,6 +219,7 @@ func (h *Handler) Init(c *config.Config) {
Micro: 11,
String: "10.0.11",
Edition: "community",
Product: "reva",
}
}

Expand Down

0 comments on commit f5f0c13

Please sign in to comment.