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:
1 parent
5cfd983cc2
commit
af2f51f196
6 files changed
+157
-4
No files matched your search
@@ -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