aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1/repo/keys.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-13 23:20:22 -0400
committerUnknwon <u@gogs.io>2016-03-13 23:20:22 -0400
commit9bd9ad420582a7a34d18011847bb789f64271b1f (patch)
tree05b1191897ed5f56395faacd3c8bf1ab00a14c9c /routers/api/v1/repo/keys.go
parentdd6faf7f9bd0a1dbf986e124ea0f4db249e1da48 (diff)
#1692 add CRUD issue APIs
- Fix go-gogs-client#10 - Related to #809
Diffstat (limited to 'routers/api/v1/repo/keys.go')
-rw-r--r--routers/api/v1/repo/keys.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/repo/keys.go b/routers/api/v1/repo/keys.go
index d8ae137c..563dac26 100644
--- a/routers/api/v1/repo/keys.go
+++ b/routers/api/v1/repo/keys.go
@@ -34,7 +34,7 @@ func ListDeployKeys(ctx *context.APIContext) {
ctx.Error(500, "GetContent", err)
return
}
- apiKeys[i] = convert.ToApiDeployKey(apiLink, keys[i])
+ apiKeys[i] = convert.ToDeployKey(apiLink, keys[i])
}
ctx.JSON(200, &apiKeys)
@@ -58,7 +58,7 @@ func GetDeployKey(ctx *context.APIContext) {
}
apiLink := composeDeployKeysAPILink(ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name)
- ctx.JSON(200, convert.ToApiDeployKey(apiLink, key))
+ ctx.JSON(200, convert.ToDeployKey(apiLink, key))
}
func HandleCheckKeyStringError(ctx *context.APIContext, err error) {
@@ -96,7 +96,7 @@ func CreateDeployKey(ctx *context.APIContext, form api.CreateKeyOption) {
key.Content = content
apiLink := composeDeployKeysAPILink(ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name)
- ctx.JSON(201, convert.ToApiDeployKey(apiLink, key))
+ ctx.JSON(201, convert.ToDeployKey(apiLink, key))
}
// https://github.com/gogits/go-gogs-client/wiki/Repositories-Deploy-Keys#remove-a-deploy-key