mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-24 10:00:50 +00:00
parent
da89afda58
commit
93a1de4842
9 changed files with 132 additions and 54 deletions
|
@ -267,13 +267,7 @@ func Get(ctx *context.APIContext) {
|
|||
// 200: Repository
|
||||
// 500: error
|
||||
|
||||
repo := ctx.Repo.Repository
|
||||
access, err := models.AccessLevel(ctx.User.ID, repo)
|
||||
if err != nil {
|
||||
ctx.Error(500, "GetRepository", err)
|
||||
return
|
||||
}
|
||||
ctx.JSON(200, repo.APIFormat(access))
|
||||
ctx.JSON(200, ctx.Repo.Repository.APIFormat(ctx.Repo.AccessMode))
|
||||
}
|
||||
|
||||
// GetByID returns a single Repository
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue