diff options
author | Unknwon <u@gogs.io> | 2016-03-13 23:20:22 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-13 23:20:22 -0400 |
commit | 9bd9ad420582a7a34d18011847bb789f64271b1f (patch) | |
tree | 05b1191897ed5f56395faacd3c8bf1ab00a14c9c /routers/api/v1/user/keys.go | |
parent | dd6faf7f9bd0a1dbf986e124ea0f4db249e1da48 (diff) |
#1692 add CRUD issue APIs
- Fix go-gogs-client#10
- Related to #809
Diffstat (limited to 'routers/api/v1/user/keys.go')
-rw-r--r-- | routers/api/v1/user/keys.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/user/keys.go b/routers/api/v1/user/keys.go index 3e1ed666..7337112e 100644 --- a/routers/api/v1/user/keys.go +++ b/routers/api/v1/user/keys.go @@ -46,7 +46,7 @@ func listPublicKeys(ctx *context.APIContext, uid int64) { apiLink := composePublicKeysAPILink() apiKeys := make([]*api.PublicKey, len(keys)) for i := range keys { - apiKeys[i] = convert.ToApiPublicKey(apiLink, keys[i]) + apiKeys[i] = convert.ToPublicKey(apiLink, keys[i]) } ctx.JSON(200, &apiKeys) @@ -79,7 +79,7 @@ func GetPublicKey(ctx *context.APIContext) { } apiLink := composePublicKeysAPILink() - ctx.JSON(200, convert.ToApiPublicKey(apiLink, key)) + ctx.JSON(200, convert.ToPublicKey(apiLink, key)) } // CreateUserPublicKey creates new public key to given user by ID. @@ -96,7 +96,7 @@ func CreateUserPublicKey(ctx *context.APIContext, form api.CreateKeyOption, uid return } apiLink := composePublicKeysAPILink() - ctx.JSON(201, convert.ToApiPublicKey(apiLink, key)) + ctx.JSON(201, convert.ToPublicKey(apiLink, key)) } // https://github.com/gogits/go-gogs-client/wiki/Users-Public-Keys#create-a-public-key |