Skip to content

Commit

Permalink
fix capabilities decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
2403905 committed Nov 8, 2023
1 parent acbd11b commit d02ba51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-capabilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix capabilities decoding

We have fixed a bug when the mapstructure is ignored the embedded structure when decode

https://github.com/cs3org/reva/pull/4324
6 changes: 3 additions & 3 deletions internal/http/services/owncloud/ocs/data/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ type CapabilitiesSearchProperties struct {

// CapabilitiesSearchProperty represents the default search property
type CapabilitiesSearchProperty struct {
Enabled bool `json:"enabled" xml:"enabled" mapstructure:"enabled"`
Enabled ocsBool `json:"enabled" xml:"enabled" mapstructure:"enabled"`
}

// CapabilitiesSearchPropertyExtended represents the extended search property
type CapabilitiesSearchPropertyExtended struct {
CapabilitiesSearchProperty
Keywords []string `json:"keywords,omitempty" xml:"keywords,omitempty" mapstructure:"keywords"`
CapabilitiesSearchProperty `mapstructure:",squash"`
Keywords []string `json:"keywords,omitempty" xml:"keywords,omitempty" mapstructure:"keywords"`
}

// Spaces lets a service configure its advertised options related to Storage Spaces.
Expand Down

0 comments on commit d02ba51

Please sign in to comment.