1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-25 13:19:37 -05:00

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

This commit is contained in:
6543 2021-07-13 21:31:59 +02:00 committed by GitHub
parent d26551bd0c
commit 56b7f53329
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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