Skip to content

Commit

Permalink
Return updated repository when changing repository using API (#16420)
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 authored Jul 13, 2021
1 parent d26551b commit 56b7f53
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion routers/api/v1/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56b7f53

Please sign in to comment.