Skip to content

Commit

Permalink
Return updated repository when changing repository using API (go-gite…
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 authored and AbdulrhmnGhanem committed Aug 10, 2021
1 parent b4a38dc commit 0a2631e
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 0a2631e

Please sign in to comment.