aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/key.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/key.go')
-rw-r--r--routers/api/v1/repo/key.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/key.go b/routers/api/v1/repo/key.go
index 3d16ae6d40..3e6174f621 100644
--- a/routers/api/v1/repo/key.go
+++ b/routers/api/v1/repo/key.go
@@ -21,13 +21,13 @@ import (
func appendPrivateInformation(apiKey *api.DeployKey, key *models.DeployKey, repository *models.Repository) (*api.DeployKey, error) {
apiKey.ReadOnly = key.Mode == models.AccessModeRead
if repository.ID == key.RepoID {
- apiKey.Repository = repository.APIFormat(key.Mode)
+ apiKey.Repository = convert.ToRepo(repository, key.Mode)
} else {
repo, err := models.GetRepositoryByID(key.RepoID)
if err != nil {
return apiKey, err
}
- apiKey.Repository = repo.APIFormat(key.Mode)
+ apiKey.Repository = convert.ToRepo(repo, key.Mode)
}
return apiKey, nil
}