summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/repo.go')
-rw-r--r--routers/api/v1/repo/repo.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index 5f17dc9268..c2dfc4f193 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -160,7 +160,7 @@ func Search(ctx *context.APIContext) {
opts.Collaborate = util.OptionalBoolFalse
}
- var mode = ctx.FormString("mode")
+ mode := ctx.FormString("mode")
switch mode {
case "source":
opts.Fork = util.OptionalBoolFalse
@@ -186,9 +186,9 @@ func Search(ctx *context.APIContext) {
opts.IsPrivate = util.OptionalBoolOf(ctx.FormBool("is_private"))
}
- var sortMode = ctx.FormString("sort")
+ sortMode := ctx.FormString("sort")
if len(sortMode) > 0 {
- var sortOrder = ctx.FormString("order")
+ sortOrder := ctx.FormString("order")
if len(sortOrder) == 0 {
sortOrder = "asc"
}