diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-09-06 20:08:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-06 12:08:51 +0000 |
commit | b9df9fa2e22d0bbf66a549183749b9dfaca6bd2f (patch) | |
tree | 2746f647c6d5f616afa5fc9acd2103e7091cb1ff /services/repository/adopt.go | |
parent | b3d88ada01c5bafe0581dc129fabe35a6faa3a85 (diff) | |
download | gitea-b9df9fa2e22d0bbf66a549183749b9dfaca6bd2f.tar.gz gitea-b9df9fa2e22d0bbf66a549183749b9dfaca6bd2f.zip |
Move createrepository from module to service layer (#26927)
Repository creation depends on many models, so moving it to service
layer is better.
Diffstat (limited to 'services/repository/adopt.go')
-rw-r--r-- | services/repository/adopt.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/repository/adopt.go b/services/repository/adopt.go index f225538faf..00dce7295e 100644 --- a/services/repository/adopt.go +++ b/services/repository/adopt.go @@ -27,7 +27,7 @@ import ( ) // AdoptRepository adopts pre-existing repository files for the user/organization. -func AdoptRepository(ctx context.Context, doer, u *user_model.User, opts repo_module.CreateRepoOptions) (*repo_model.Repository, error) { +func AdoptRepository(ctx context.Context, doer, u *user_model.User, opts CreateRepoOptions) (*repo_model.Repository, error) { if !doer.IsAdmin && !u.CanCreateRepo() { return nil, repo_model.ErrReachLimitOfRepo{ Limit: u.MaxRepoCreation, |