Folder: Add folder service implementation (#58182)
* Folder: Add folder service implementation * Add Move * Add tests * Add new servie method and adjust Update, Delete and Move * Remove contains * GetTree return children of depth one
This commit is contained in:
@@ -120,6 +120,12 @@ func (ss *sqlStore) Update(ctx context.Context, cmd folder.UpdateFolderCommand)
|
||||
args = append(args, cmd.Folder.UID)
|
||||
}
|
||||
|
||||
if cmd.NewParentUID != nil {
|
||||
columnsToUpdate = append(columnsToUpdate, "parent_uid = ?")
|
||||
cmd.Folder.ParentUID = *cmd.NewParentUID
|
||||
args = append(args, cmd.Folder.UID)
|
||||
}
|
||||
|
||||
if len(columnsToUpdate) == 0 {
|
||||
return folder.ErrBadRequest.Errorf("no columns to update")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user