#1692 add CRUD issue APIs

- Fix go-gogs-client#10
- Related to #809
This commit is contained in:
Unknwon
2016-03-13 23:20:22 -04:00
parent dd6faf7f9b
commit 9bd9ad4205
23 changed files with 406 additions and 140 deletions

View File

@@ -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