diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-10 12:41:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-10 12:41:51 +0800 |
commit | daab2451676b1a3a5312af0e2a443e6017113702 (patch) | |
tree | b0ee4405a3b9459051537e3e258fd0fafe9100b7 | |
parent | 1b7402bd1dfcf7435c2c2345aab1c43d6b0186ca (diff) | |
download | gitea-daab2451676b1a3a5312af0e2a443e6017113702.tar.gz gitea-daab2451676b1a3a5312af0e2a443e6017113702.zip |
Move code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/convert (#8892)
* Move code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/convert
* fix fmt
26 files changed, 24 insertions, 24 deletions
diff --git a/integrations/api_team_test.go b/integrations/api_team_test.go index e25ffdf7b1..3a27cd4865 100644 --- a/integrations/api_team_test.go +++ b/integrations/api_team_test.go @@ -11,8 +11,8 @@ import ( "testing" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" "github.com/stretchr/testify/assert" ) diff --git a/integrations/api_team_user_test.go b/integrations/api_team_user_test.go index 4df4dac016..f847c78949 100644 --- a/integrations/api_team_user_test.go +++ b/integrations/api_team_user_test.go @@ -10,8 +10,8 @@ import ( "time" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" "github.com/stretchr/testify/assert" ) diff --git a/routers/api/v1/convert/convert.go b/modules/convert/convert.go index f52ed63476..f52ed63476 100644 --- a/routers/api/v1/convert/convert.go +++ b/modules/convert/convert.go diff --git a/routers/api/v1/convert/utils.go b/modules/convert/utils.go index 66fb21be67..66fb21be67 100644 --- a/routers/api/v1/convert/utils.go +++ b/modules/convert/utils.go diff --git a/routers/api/v1/admin/org.go b/routers/api/v1/admin/org.go index cdec9e7fad..8d3b0123c5 100644 --- a/routers/api/v1/admin/org.go +++ b/routers/api/v1/admin/org.go @@ -8,8 +8,8 @@ package admin import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" 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/user.go b/routers/api/v1/admin/user.go index f35ad297b0..3a4750c6ba 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -10,10 +10,10 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/password" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/user" "code.gitea.io/gitea/services/mailer" ) diff --git a/routers/api/v1/org/hook.go b/routers/api/v1/org/hook.go index 3f391e4b2b..c7b0bd5b6b 100644 --- a/routers/api/v1/org/hook.go +++ b/routers/api/v1/org/hook.go @@ -7,8 +7,8 @@ package org import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" 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 370536d22f..be47b6963f 100644 --- a/routers/api/v1/org/member.go +++ b/routers/api/v1/org/member.go @@ -9,9 +9,9 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" "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 8a1a478ba1..d698592361 100644 --- a/routers/api/v1/org/org.go +++ b/routers/api/v1/org/org.go @@ -8,8 +8,8 @@ package org import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" 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 a22b60a2c6..b2b5fe6dad 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -10,9 +10,9 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/log" 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 670123a858..9f6a2e6294 100644 --- a/routers/api/v1/repo/branch.go +++ b/routers/api/v1/repo/branch.go @@ -7,9 +7,9 @@ package repo import ( "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" 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 132652e2a9..81d472dffb 100644 --- a/routers/api/v1/repo/collaborators.go +++ b/routers/api/v1/repo/collaborators.go @@ -10,8 +10,8 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" ) // ListCollaborators list a repository's collaborators diff --git a/routers/api/v1/repo/git_hook.go b/routers/api/v1/repo/git_hook.go index 80610356dd..46651ef614 100644 --- a/routers/api/v1/repo/git_hook.go +++ b/routers/api/v1/repo/git_hook.go @@ -6,9 +6,9 @@ package repo import ( "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" ) // ListGitHooks list all Git hooks of a repository diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go index 18f1fba056..3666d79fa0 100644 --- a/routers/api/v1/repo/hook.go +++ b/routers/api/v1/repo/hook.go @@ -7,10 +7,10 @@ package repo import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/webhook" - "code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/api/v1/utils" ) diff --git a/routers/api/v1/repo/key.go b/routers/api/v1/repo/key.go index 42bf024a5f..6b499d2fb1 100644 --- a/routers/api/v1/repo/key.go +++ b/routers/api/v1/repo/key.go @@ -9,9 +9,9 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/setting" 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/repo.go b/routers/api/v1/repo/repo.go index 7b752370d4..c907bba66b 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -16,6 +16,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/migrations" "code.gitea.io/gitea/modules/notification" @@ -24,7 +25,6 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/validation" - "code.gitea.io/gitea/routers/api/v1/convert" mirror_service "code.gitea.io/gitea/services/mirror" repo_service "code.gitea.io/gitea/services/repository" ) diff --git a/routers/api/v1/repo/star.go b/routers/api/v1/repo/star.go index 2eb5daeced..8fe5b17c5f 100644 --- a/routers/api/v1/repo/star.go +++ b/routers/api/v1/repo/star.go @@ -6,8 +6,8 @@ package repo import ( "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" ) // ListStargazers list a repository's stargazers diff --git a/routers/api/v1/repo/subscriber.go b/routers/api/v1/repo/subscriber.go index 79ad0e0221..0e576b4ff0 100644 --- a/routers/api/v1/repo/subscriber.go +++ b/routers/api/v1/repo/subscriber.go @@ -6,8 +6,8 @@ package repo import ( "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" ) // ListSubscribers list a repo's subscribers (i.e. watchers) diff --git a/routers/api/v1/repo/tag.go b/routers/api/v1/repo/tag.go index a802048285..6cfdb461ee 100644 --- a/routers/api/v1/repo/tag.go +++ b/routers/api/v1/repo/tag.go @@ -8,8 +8,8 @@ import ( "net/http" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" 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/repo/topic.go b/routers/api/v1/repo/topic.go index 6c3ac0020a..1656fd1b16 100644 --- a/routers/api/v1/repo/topic.go +++ b/routers/api/v1/repo/topic.go @@ -10,9 +10,9 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/log" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" ) // ListTopics returns list of current topics for repo diff --git a/routers/api/v1/user/email.go b/routers/api/v1/user/email.go index 027f4e2763..8c0eb889ed 100644 --- a/routers/api/v1/user/email.go +++ b/routers/api/v1/user/email.go @@ -7,9 +7,9 @@ package user import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" ) // ListEmails list all of the authenticated user's email addresses diff --git a/routers/api/v1/user/follower.go b/routers/api/v1/user/follower.go index 59df9665f4..ec512b9806 100644 --- a/routers/api/v1/user/follower.go +++ b/routers/api/v1/user/follower.go @@ -7,8 +7,8 @@ package user import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" ) func responseAPIUsers(ctx *context.APIContext, users []*models.User) { diff --git a/routers/api/v1/user/gpg_key.go b/routers/api/v1/user/gpg_key.go index fa85e47a82..82113caf0c 100644 --- a/routers/api/v1/user/gpg_key.go +++ b/routers/api/v1/user/gpg_key.go @@ -7,8 +7,8 @@ package user import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" ) func listGPGKeys(ctx *context.APIContext, uid int64) { diff --git a/routers/api/v1/user/key.go b/routers/api/v1/user/key.go index 8425535b10..a812edfcc7 100644 --- a/routers/api/v1/user/key.go +++ b/routers/api/v1/user/key.go @@ -7,9 +7,9 @@ package user import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" "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/user.go b/routers/api/v1/user/user.go index 0639494c0e..6f3fc4d32b 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -10,8 +10,8 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/api/v1/convert" "github.com/unknwon/com" ) diff --git a/routers/api/v1/utils/hook.go b/routers/api/v1/utils/hook.go index 6f72e99b71..f88b152003 100644 --- a/routers/api/v1/utils/hook.go +++ b/routers/api/v1/utils/hook.go @@ -11,9 +11,9 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/webhook" - "code.gitea.io/gitea/routers/api/v1/convert" "code.gitea.io/gitea/routers/utils" "github.com/unknwon/com" |