diff options
author | 6543 <6543@obermui.de> | 2021-07-13 21:31:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 20:31:59 +0100 |
commit | 56b7f53329afa913055f5157537614b80d2d4e30 (patch) | |
tree | 0c13796907849e61be2a0fe8ef193c179da7e99d /routers | |
parent | d26551bd0c2780d4e58fd21e3856f36eed62779d (diff) | |
download | gitea-56b7f53329afa913055f5157537614b80d2d4e30.tar.gz gitea-56b7f53329afa913055f5157537614b80d2d4e30.zip |
Return updated repository when changing repository using API (#16420)
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/repo/repo.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 77691b4d15..b671ef2435 100644 --- a/routers/api/v1/repo/repo.go +++ b/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 |