aboutsummaryrefslogtreecommitdiff
path: root/internal/route/api/v1
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/api/v1')
-rw-r--r--internal/route/api/v1/repo/branch.go4
-rw-r--r--internal/route/api/v1/repo/hook.go5
2 files changed, 5 insertions, 4 deletions
diff --git a/internal/route/api/v1/repo/branch.go b/internal/route/api/v1/repo/branch.go
index 3ddf62cc..eb19c657 100644
--- a/internal/route/api/v1/repo/branch.go
+++ b/internal/route/api/v1/repo/branch.go
@@ -25,7 +25,7 @@ func GetBranch(c *context.APIContext) {
return
}
- c.JSONSuccess( convert.ToBranch(branch, commit))
+ c.JSONSuccess(convert.ToBranch(branch, commit))
}
// https://github.com/gogs/go-gogs-client/wiki/Repositories#list-branches
@@ -46,5 +46,5 @@ func ListBranches(c *context.APIContext) {
apiBranches[i] = convert.ToBranch(branches[i], commit)
}
- c.JSONSuccess( &apiBranches)
+ c.JSONSuccess(&apiBranches)
}
diff --git a/internal/route/api/v1/repo/hook.go b/internal/route/api/v1/repo/hook.go
index d5730165..6aa3feb5 100644
--- a/internal/route/api/v1/repo/hook.go
+++ b/internal/route/api/v1/repo/hook.go
@@ -7,11 +7,12 @@ package repo
import (
"net/http"
- api "github.com/gogs/go-gogs-client"
- "github.com/json-iterator/go"
+ jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/unknwon/com"
+ api "github.com/gogs/go-gogs-client"
+
"gogs.io/gogs/internal/context"
"gogs.io/gogs/internal/db"
"gogs.io/gogs/internal/route/api/v1/convert"