aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1/repo
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-12-22 19:58:30 -0500
committerUnknwon <u@gogs.io>2016-12-22 19:58:30 -0500
commit03f7f3ee67f9b4d828c2dbc938cbf9648bf53377 (patch)
tree9c3f9c4d91eec0df22a8f6fdbe703ada94efcaad /routers/api/v1/repo
parent6383bf748072279a101bf5ecdc0c56a0338f3046 (diff)
Some code renaming
Diffstat (limited to 'routers/api/v1/repo')
-rw-r--r--routers/api/v1/repo/hook.go2
-rw-r--r--routers/api/v1/repo/issue_label.go2
-rw-r--r--routers/api/v1/repo/label.go4
-rw-r--r--routers/api/v1/repo/milestone.go2
4 files changed, 5 insertions, 5 deletions
diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go
index 3b36055d..9857d2eb 100644
--- a/routers/api/v1/repo/hook.go
+++ b/routers/api/v1/repo/hook.go
@@ -166,7 +166,7 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) {
}
func DeleteHook(ctx *context.APIContext) {
- if err := models.DeleteWebhookByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id")); err != nil {
+ if err := models.DeleteWebhookOfRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id")); err != nil {
ctx.Error(500, "DeleteWebhookByRepoID", err)
return
}
diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go
index f1eed211..c359754b 100644
--- a/routers/api/v1/repo/issue_label.go
+++ b/routers/api/v1/repo/issue_label.go
@@ -85,7 +85,7 @@ func DeleteIssueLabel(ctx *context.APIContext) {
return
}
- label, err := models.GetLabelInRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
+ label, err := models.GetLabelOfRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
if err != nil {
if models.IsErrLabelNotExist(err) {
ctx.Error(422, "", err)
diff --git a/routers/api/v1/repo/label.go b/routers/api/v1/repo/label.go
index 705206ce..981eaef1 100644
--- a/routers/api/v1/repo/label.go
+++ b/routers/api/v1/repo/label.go
@@ -26,7 +26,7 @@ func ListLabels(ctx *context.APIContext) {
}
func GetLabel(ctx *context.APIContext) {
- label, err := models.GetLabelInRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
+ label, err := models.GetLabelOfRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
if err != nil {
if models.IsErrLabelNotExist(err) {
ctx.Status(404)
@@ -63,7 +63,7 @@ func EditLabel(ctx *context.APIContext, form api.EditLabelOption) {
return
}
- label, err := models.GetLabelInRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
+ label, err := models.GetLabelOfRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
if err != nil {
if models.IsErrLabelNotExist(err) {
ctx.Status(404)
diff --git a/routers/api/v1/repo/milestone.go b/routers/api/v1/repo/milestone.go
index 652ccbb5..2dcc3a52 100644
--- a/routers/api/v1/repo/milestone.go
+++ b/routers/api/v1/repo/milestone.go
@@ -89,7 +89,7 @@ func EditMilestone(ctx *context.APIContext, form api.EditMilestoneOption) {
}
func DeleteMilestone(ctx *context.APIContext) {
- if err := models.DeleteMilestoneByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id")); err != nil {
+ if err := models.DeleteMilestoneOfRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id")); err != nil {
ctx.Error(500, "DeleteMilestoneByRepoID", err)
return
}