NestedFolders: Add API endpoint for descendant count in a folder (#66550)
* Add CountInFolder to RegistryService interface * Add folder children counts api route * Update fake GetFolderChildrenCounts * Add test for getting folder children counts * Add validation to folder children counts handler * Update openapi specs * Update pkg/services/folder/folderimpl/folder.go Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com> --------- Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
This commit is contained in:
co-authored by
Sofia Papagiannaki
parent
990b3c07ab
commit
fd434cab58
@@ -160,3 +160,14 @@ type HasEditPermissionInFoldersQuery struct {
|
||||
type HasAdminPermissionInDashboardsOrFoldersQuery struct {
|
||||
SignedInUser *user.SignedInUser
|
||||
}
|
||||
|
||||
// GetChildrenCountsQuery captures the information required by the folder service
|
||||
// to return the count of children in a folder.
|
||||
type GetChildrenCountsQuery struct {
|
||||
UID *string
|
||||
OrgID int64
|
||||
|
||||
SignedInUser *user.SignedInUser `json:"-"`
|
||||
}
|
||||
|
||||
type ChildrenCounts map[string]int64
|
||||
|
||||
Reference in New Issue
Block a user