Add move endpoint into folder service (#58575)

* add move endpoint

* change signatures
This commit is contained in:
ying-jeanne
2022-11-10 09:06:52 -05:00
committed by GitHub
parent 778337e522
commit b13b58ebf8
7 changed files with 46 additions and 8 deletions
+2 -3
View File
@@ -18,6 +18,8 @@ type Service interface {
Update(ctx context.Context, user *user.SignedInUser, orgID int64, existingUid string, cmd *models.UpdateFolderCommand) (*models.Folder, error)
DeleteFolder(ctx context.Context, cmd *DeleteFolderCommand) error
MakeUserAdmin(ctx context.Context, orgID int64, userID, folderID int64, setViewAndEditPermissions bool) error
// Move changes a folder's parent folder to the requested new parent.
Move(ctx context.Context, cmd *MoveFolderCommand) (*Folder, error)
}
// NestedFolderService is the temporary interface definition for the folder
@@ -29,9 +31,6 @@ type NestedFolderService interface {
// Create creates a new folder.
Create(ctx context.Context, cmd *CreateFolderCommand) (*Folder, error)
// Move changes a folder's parent folder to the requested new parent.
Move(ctx context.Context, cmd *MoveFolderCommand) (*Folder, error)
// Delete deletes a folder. This will return an error if there are any
// dashboards in the folder.
Delete(ctx context.Context, cmd *DeleteFolderCommand) (*Folder, error)