Skip to content

Commit

Permalink
Merge pull request #4662 from nextcloud-libraries/feature/resource-ty…
Browse files Browse the repository at this point in the history
…pe-prop

Add the resource type on RelatedResourcesPanel
  • Loading branch information
GretaD authored Oct 20, 2023
2 parents 7d141d1 + 81cfec0 commit 9a55a95
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ export default {
type: [String, Number],
default: null,
},
/**
* Limits to specific resource type. i.e. any provider id implemented with `\OCA\RelatedResources\IRelatedResourceProvider::getProviderId()`
*/
resourceType: {
type: String,
default: null,
},
/**
* Set the maximum number of resources to load
*/
limit: {
type: Number,
default: null,
},
/**
* Only used by the files sidebar
*
Expand Down Expand Up @@ -156,9 +170,11 @@ export default {
itemId = this.itemId
}
return generateOcsUrl('/apps/related_resources/related/{providerId}?itemId={itemId}&format=json', {
return generateOcsUrl('/apps/related_resources/related/{providerId}?itemId={itemId}&resourceType={resourceType}&limit={limit}&format=json', {
providerId,
itemId,
resourceType: this.resourceType,
limit: this.limit,
})
},
},
Expand Down

0 comments on commit 9a55a95

Please sign in to comment.