Skip to content

Commit

Permalink
Merge pull request #4324 from 2403905/issue-7432-fix
Browse files Browse the repository at this point in the history
fix capabilities decoding
  • Loading branch information
2403905 committed Nov 8, 2023
2 parents 2405e27 + d02ba51 commit 830ea50
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 830ea50

Please sign in to comment.