aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api
diff options
context:
space:
mode:
authorTamal Saha <tamal@appscode.com>2019-08-23 09:40:30 -0700
committertechknowlogick <techknowlogick@gitea.io>2019-08-23 12:40:29 -0400
commit171b3598778a1ecd0a921c71ed6755bfef68f7f0 (patch)
tree02857629ef9e8e26ee0ee559153f803f77b588b7 /routers/api
parentca6fb004ac50fc924861112403895d637c6a2d1d (diff)
downloadgitea-171b3598778a1ecd0a921c71ed6755bfef68f7f0.tar.gz
gitea-171b3598778a1ecd0a921c71ed6755bfef68f7f0.zip
Use gitea forked macaron (#7933)
Signed-off-by: Tamal Saha <tamal@appscode.com>
Diffstat (limited to 'routers/api')
-rw-r--r--routers/api/v1/admin/org.go3
-rw-r--r--routers/api/v1/admin/repo.go3
-rw-r--r--routers/api/v1/api.go6
-rw-r--r--routers/api/v1/convert/convert.go2
-rw-r--r--routers/api/v1/misc/markdown.go3
-rw-r--r--routers/api/v1/misc/markdown_test.go4
-rw-r--r--routers/api/v1/org/hook.go3
-rw-r--r--routers/api/v1/org/member.go3
-rw-r--r--routers/api/v1/org/org.go3
-rw-r--r--routers/api/v1/org/team.go3
-rw-r--r--routers/api/v1/repo/branch.go3
-rw-r--r--routers/api/v1/repo/collaborators.go1
-rw-r--r--routers/api/v1/repo/fork.go1
-rw-r--r--routers/api/v1/repo/issue.go3
-rw-r--r--routers/api/v1/repo/issue_comment.go1
-rw-r--r--routers/api/v1/repo/issue_label.go1
-rw-r--r--routers/api/v1/repo/issue_tracked_time.go1
-rw-r--r--routers/api/v1/repo/key.go3
-rw-r--r--routers/api/v1/repo/label.go1
-rw-r--r--routers/api/v1/repo/release.go1
-rw-r--r--routers/api/v1/repo/release_attachment.go3
-rw-r--r--routers/api/v1/repo/repo.go3
-rw-r--r--routers/api/v1/repo/star.go1
-rw-r--r--routers/api/v1/repo/status.go1
-rw-r--r--routers/api/v1/repo/subscriber.go1
-rw-r--r--routers/api/v1/repo/tag.go4
-rw-r--r--routers/api/v1/user/app.go3
-rw-r--r--routers/api/v1/user/email.go3
-rw-r--r--routers/api/v1/user/follower.go3
-rw-r--r--routers/api/v1/user/gpg_key.go3
-rw-r--r--routers/api/v1/user/key.go3
-rw-r--r--routers/api/v1/user/star.go3
-rw-r--r--routers/api/v1/user/user.go2
-rw-r--r--routers/api/v1/user/watch.go3
-rw-r--r--routers/api/v1/utils/hook.go2
35 files changed, 29 insertions, 58 deletions
diff --git a/routers/api/v1/admin/org.go b/routers/api/v1/admin/org.go
index c90e739626..cdec9e7fad 100644
--- a/routers/api/v1/admin/org.go
+++ b/routers/api/v1/admin/org.go
@@ -6,10 +6,9 @@
package admin
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
"code.gitea.io/gitea/routers/api/v1/user"
)
diff --git a/routers/api/v1/admin/repo.go b/routers/api/v1/admin/repo.go
index aaa7957a50..1f64b42238 100644
--- a/routers/api/v1/admin/repo.go
+++ b/routers/api/v1/admin/repo.go
@@ -5,9 +5,8 @@
package admin
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/modules/context"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/repo"
"code.gitea.io/gitea/routers/api/v1/user"
)
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index cd308fce51..69dfc89378 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -74,9 +74,9 @@ import (
_ "code.gitea.io/gitea/routers/api/v1/swagger" // for swagger generation
"code.gitea.io/gitea/routers/api/v1/user"
- "github.com/go-macaron/binding"
- "github.com/go-macaron/cors"
- macaron "gopkg.in/macaron.v1"
+ "gitea.com/macaron/binding"
+ "gitea.com/macaron/cors"
+ "gitea.com/macaron/macaron"
)
func sudo() macaron.Handler {
diff --git a/routers/api/v1/convert/convert.go b/routers/api/v1/convert/convert.go
index d2691f8238..90202117cc 100644
--- a/routers/api/v1/convert/convert.go
+++ b/routers/api/v1/convert/convert.go
@@ -15,7 +15,7 @@ import (
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
- "github.com/Unknwon/com"
+ "github.com/unknwon/com"
)
// ToEmail convert models.EmailAddress to api.Email
diff --git a/routers/api/v1/misc/markdown.go b/routers/api/v1/misc/markdown.go
index b00b00c499..23f0b168d0 100644
--- a/routers/api/v1/misc/markdown.go
+++ b/routers/api/v1/misc/markdown.go
@@ -8,11 +8,10 @@ import (
"net/http"
"strings"
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/markup/markdown"
"code.gitea.io/gitea/modules/setting"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
"mvdan.cc/xurls/v2"
diff --git a/routers/api/v1/misc/markdown_test.go b/routers/api/v1/misc/markdown_test.go
index 6cb6b92f9f..47e99d2f06 100644
--- a/routers/api/v1/misc/markdown_test.go
+++ b/routers/api/v1/misc/markdown_test.go
@@ -13,9 +13,9 @@ import (
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
- "github.com/go-macaron/inject"
+ "gitea.com/macaron/inject"
+ "gitea.com/macaron/macaron"
"github.com/stretchr/testify/assert"
- macaron "gopkg.in/macaron.v1"
)
const AppURL = "http://localhost:3000/"
diff --git a/routers/api/v1/org/hook.go b/routers/api/v1/org/hook.go
index 128cfec328..3f391e4b2b 100644
--- a/routers/api/v1/org/hook.go
+++ b/routers/api/v1/org/hook.go
@@ -5,10 +5,9 @@
package org
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
"code.gitea.io/gitea/routers/api/v1/utils"
)
diff --git a/routers/api/v1/org/member.go b/routers/api/v1/org/member.go
index 4ada2d6ef6..370536d22f 100644
--- a/routers/api/v1/org/member.go
+++ b/routers/api/v1/org/member.go
@@ -7,11 +7,10 @@ package org
import (
"fmt"
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
"code.gitea.io/gitea/routers/api/v1/user"
)
diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go
index 2893887a4b..3adc204d3b 100644
--- a/routers/api/v1/org/org.go
+++ b/routers/api/v1/org/org.go
@@ -6,10 +6,9 @@
package org
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
"code.gitea.io/gitea/routers/api/v1/user"
)
diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go
index 59a000b670..3357c07251 100644
--- a/routers/api/v1/org/team.go
+++ b/routers/api/v1/org/team.go
@@ -6,10 +6,9 @@
package org
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
"code.gitea.io/gitea/routers/api/v1/user"
)
diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go
index 1aaae8723b..670123a858 100644
--- a/routers/api/v1/repo/branch.go
+++ b/routers/api/v1/repo/branch.go
@@ -8,9 +8,8 @@ package repo
import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/git"
- "code.gitea.io/gitea/routers/api/v1/convert"
-
api "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/routers/api/v1/convert"
)
// GetBranch get a branch of a repository
diff --git a/routers/api/v1/repo/collaborators.go b/routers/api/v1/repo/collaborators.go
index 3ba03e054c..132652e2a9 100644
--- a/routers/api/v1/repo/collaborators.go
+++ b/routers/api/v1/repo/collaborators.go
@@ -10,7 +10,6 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
-
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
)
diff --git a/routers/api/v1/repo/fork.go b/routers/api/v1/repo/fork.go
index c004544f58..7231daab29 100644
--- a/routers/api/v1/repo/fork.go
+++ b/routers/api/v1/repo/fork.go
@@ -7,7 +7,6 @@ package repo
import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
-
api "code.gitea.io/gitea/modules/structs"
)
diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go
index 8595be335b..402da82f07 100644
--- a/routers/api/v1/repo/issue.go
+++ b/routers/api/v1/repo/issue.go
@@ -16,10 +16,9 @@ import (
issue_indexer "code.gitea.io/gitea/modules/indexer/issues"
"code.gitea.io/gitea/modules/notification"
"code.gitea.io/gitea/modules/setting"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/util"
-
- api "code.gitea.io/gitea/modules/structs"
)
// ListIssues list the issues of a repository
diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go
index 14e81222e3..18fa1d3eb2 100644
--- a/routers/api/v1/repo/issue_comment.go
+++ b/routers/api/v1/repo/issue_comment.go
@@ -11,7 +11,6 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/notification"
-
api "code.gitea.io/gitea/modules/structs"
)
diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go
index 7c22e6885c..e66bc35e90 100644
--- a/routers/api/v1/repo/issue_label.go
+++ b/routers/api/v1/repo/issue_label.go
@@ -8,7 +8,6 @@ package repo
import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
-
api "code.gitea.io/gitea/modules/structs"
)
diff --git a/routers/api/v1/repo/issue_tracked_time.go b/routers/api/v1/repo/issue_tracked_time.go
index 194f7d32ce..c38ea05c36 100644
--- a/routers/api/v1/repo/issue_tracked_time.go
+++ b/routers/api/v1/repo/issue_tracked_time.go
@@ -7,7 +7,6 @@ package repo
import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
-
api "code.gitea.io/gitea/modules/structs"
)
diff --git a/routers/api/v1/repo/key.go b/routers/api/v1/repo/key.go
index 59782d05f6..42bf024a5f 100644
--- a/routers/api/v1/repo/key.go
+++ b/routers/api/v1/repo/key.go
@@ -10,9 +10,8 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
- "code.gitea.io/gitea/routers/api/v1/convert"
-
api "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/routers/api/v1/convert"
)
// appendPrivateInformation appends the owner and key type information to api.PublicKey
diff --git a/routers/api/v1/repo/label.go b/routers/api/v1/repo/label.go
index 98ccee37bd..33574c481e 100644
--- a/routers/api/v1/repo/label.go
+++ b/routers/api/v1/repo/label.go
@@ -10,7 +10,6 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
-
api "code.gitea.io/gitea/modules/structs"
)
diff --git a/routers/api/v1/repo/release.go b/routers/api/v1/repo/release.go
index 0fdcfa355c..9296f22e80 100644
--- a/routers/api/v1/repo/release.go
+++ b/routers/api/v1/repo/release.go
@@ -8,7 +8,6 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
-
api "code.gitea.io/gitea/modules/structs"
)
diff --git a/routers/api/v1/repo/release_attachment.go b/routers/api/v1/repo/release_attachment.go
index d0eb3d4ae1..67802fd9e7 100644
--- a/routers/api/v1/repo/release_attachment.go
+++ b/routers/api/v1/repo/release_attachment.go
@@ -10,9 +10,8 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
- "code.gitea.io/gitea/modules/upload"
-
api "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/modules/upload"
)
// GetReleaseAttachment gets a single attachment of the release
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index 8d7e43edff..5fe41927fa 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -17,10 +17,9 @@ import (
"code.gitea.io/gitea/modules/migrations"
"code.gitea.io/gitea/modules/notification"
"code.gitea.io/gitea/modules/setting"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/routers/api/v1/convert"
-
- api "code.gitea.io/gitea/modules/structs"
)
var searchOrderByMap = map[string]map[string]models.SearchOrderBy{
diff --git a/routers/api/v1/repo/star.go b/routers/api/v1/repo/star.go
index 1b2ef0b027..2eb5daeced 100644
--- a/routers/api/v1/repo/star.go
+++ b/routers/api/v1/repo/star.go
@@ -6,7 +6,6 @@ package repo
import (
"code.gitea.io/gitea/modules/context"
-
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
)
diff --git a/routers/api/v1/repo/status.go b/routers/api/v1/repo/status.go
index b3d16e79bc..48edd22910 100644
--- a/routers/api/v1/repo/status.go
+++ b/routers/api/v1/repo/status.go
@@ -10,7 +10,6 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/repofiles"
-
api "code.gitea.io/gitea/modules/structs"
)
diff --git a/routers/api/v1/repo/subscriber.go b/routers/api/v1/repo/subscriber.go
index ec0ea6dada..79ad0e0221 100644
--- a/routers/api/v1/repo/subscriber.go
+++ b/routers/api/v1/repo/subscriber.go
@@ -6,7 +6,6 @@ package repo
import (
"code.gitea.io/gitea/modules/context"
-
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
)
diff --git a/routers/api/v1/repo/tag.go b/routers/api/v1/repo/tag.go
index ecf580e1b0..1753402d3a 100644
--- a/routers/api/v1/repo/tag.go
+++ b/routers/api/v1/repo/tag.go
@@ -5,11 +5,11 @@
package repo
import (
- "code.gitea.io/gitea/modules/context"
- "code.gitea.io/gitea/routers/api/v1/convert"
"net/http"
+ "code.gitea.io/gitea/modules/context"
api "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/routers/api/v1/convert"
)
// ListTags list all the tags of a repository
diff --git a/routers/api/v1/user/app.go b/routers/api/v1/user/app.go
index 8e3b476d36..e42a3cb093 100644
--- a/routers/api/v1/user/app.go
+++ b/routers/api/v1/user/app.go
@@ -6,10 +6,9 @@
package user
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ api "code.gitea.io/gitea/modules/structs"
)
// ListAccessTokens list all the access tokens
diff --git a/routers/api/v1/user/email.go b/routers/api/v1/user/email.go
index 67659cfb0f..027f4e2763 100644
--- a/routers/api/v1/user/email.go
+++ b/routers/api/v1/user/email.go
@@ -5,11 +5,10 @@
package user
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
)
diff --git a/routers/api/v1/user/follower.go b/routers/api/v1/user/follower.go
index 078f30af3c..59df9665f4 100644
--- a/routers/api/v1/user/follower.go
+++ b/routers/api/v1/user/follower.go
@@ -5,10 +5,9 @@
package user
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
)
diff --git a/routers/api/v1/user/gpg_key.go b/routers/api/v1/user/gpg_key.go
index 7bf43c5822..fa85e47a82 100644
--- a/routers/api/v1/user/gpg_key.go
+++ b/routers/api/v1/user/gpg_key.go
@@ -5,10 +5,9 @@
package user
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
)
diff --git a/routers/api/v1/user/key.go b/routers/api/v1/user/key.go
index e3d7aa4b3e..8425535b10 100644
--- a/routers/api/v1/user/key.go
+++ b/routers/api/v1/user/key.go
@@ -5,11 +5,10 @@
package user
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
+ api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
"code.gitea.io/gitea/routers/api/v1/repo"
)
diff --git a/routers/api/v1/user/star.go b/routers/api/v1/user/star.go
index e5eec71b60..744e0bf7d5 100644
--- a/routers/api/v1/user/star.go
+++ b/routers/api/v1/user/star.go
@@ -5,10 +5,9 @@
package user
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ api "code.gitea.io/gitea/modules/structs"
)
// getStarredRepos returns the repos that the user with the specified userID has
diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go
index fc3b7a8160..bb1302077b 100644
--- a/routers/api/v1/user/user.go
+++ b/routers/api/v1/user/user.go
@@ -13,7 +13,7 @@ import (
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/convert"
- "github.com/Unknwon/com"
+ "github.com/unknwon/com"
)
// Search search users
diff --git a/routers/api/v1/user/watch.go b/routers/api/v1/user/watch.go
index f0eb95ac1e..87739b15fb 100644
--- a/routers/api/v1/user/watch.go
+++ b/routers/api/v1/user/watch.go
@@ -5,11 +5,10 @@
package user
import (
- api "code.gitea.io/gitea/modules/structs"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
+ api "code.gitea.io/gitea/modules/structs"
)
// getWatchedRepos returns the repos that the user with the specified userID is
diff --git a/routers/api/v1/utils/hook.go b/routers/api/v1/utils/hook.go
index 92846c5f2a..0b00e59ade 100644
--- a/routers/api/v1/utils/hook.go
+++ b/routers/api/v1/utils/hook.go
@@ -15,7 +15,7 @@ import (
"code.gitea.io/gitea/routers/api/v1/convert"
"code.gitea.io/gitea/routers/utils"
- "github.com/Unknwon/com"
+ "github.com/unknwon/com"
)
// GetOrgHook get an organization's webhook. If there is an error, write to