chore: update folder model (json tags) to match previous model (#62117)

chore: update folder model to match previous model
This commit is contained in:
Kristin Laemmert 2023-01-25 10:04:08 -05:00 committed by GitHub
parent b0b2b72290
commit 7c27c866f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 8 deletions

View File

@ -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)
}

View File

@ -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:"-"`