Return updated repository when changing repository using API (#16420)

tokarchuk/v1.17
6543 3 years ago committed by GitHub
parent d26551bd0c
commit 56b7f53329
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      routers/api/v1/repo/repo.go

@ -620,7 +620,13 @@ func Edit(ctx *context.APIContext) {
} }
} }
ctx.JSON(http.StatusOK, convert.ToRepo(ctx.Repo.Repository, ctx.Repo.AccessMode)) repo, err := models.GetRepositoryByID(ctx.Repo.Repository.ID)
if err != nil {
ctx.InternalServerError(err)
return
}
ctx.JSON(http.StatusOK, convert.ToRepo(repo, ctx.Repo.AccessMode))
} }
// updateBasicProperties updates the basic properties of a repo: Name, Description, Website and Visibility // updateBasicProperties updates the basic properties of a repo: Name, Description, Website and Visibility

Loading…
Cancel
Save