mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 17:36:51 -06:00
chore: update folder model (json tags) to match previous model (#62117)
chore: update folder model to match previous model
This commit is contained in:
parent
b0b2b72290
commit
7c27c866f6
@ -176,12 +176,9 @@ func (hs *HTTPServer) MoveFolder(c *models.ReqContext) response.Response {
|
||||
var theFolder *folder.Folder
|
||||
var err error
|
||||
if cmd.NewParentUID != "" {
|
||||
moveCommand := folder.MoveFolderCommand{
|
||||
UID: web.Params(c.Req)[":uid"],
|
||||
NewParentUID: cmd.NewParentUID,
|
||||
OrgID: c.OrgID,
|
||||
}
|
||||
theFolder, err = hs.folderService.Move(c.Req.Context(), &moveCommand)
|
||||
cmd.OrgID = c.OrgID
|
||||
cmd.UID = web.Params(c.Req)[":uid"]
|
||||
theFolder, err = hs.folderService.Move(c.Req.Context(), &cmd)
|
||||
if err != nil {
|
||||
return response.Error(http.StatusInternalServerError, "update folder uid failed", err)
|
||||
}
|
||||
|
@ -95,8 +95,8 @@ type UpdateFolderCommand struct {
|
||||
// MoveFolderCommand captures the information required by the folder service
|
||||
// to move a folder.
|
||||
type MoveFolderCommand struct {
|
||||
UID string `json:"uid"`
|
||||
NewParentUID string `json:"newParentUid"`
|
||||
UID string `json:"-"`
|
||||
NewParentUID string `json:"parentUid"`
|
||||
OrgID int64 `json:"-"`
|
||||
|
||||
SignedInUser *user.SignedInUser `json:"-"`
|
||||
|
Loading…
Reference in New Issue
Block a user