mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Move createrepository from module to service layer (#26927)
Repository creation depends on many models, so moving it to service layer is better.
This commit is contained in:
		@@ -240,7 +240,7 @@ func CreateUserRepo(ctx *context.APIContext, owner *user_model.User, opt api.Cre
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	repo, err := repo_service.CreateRepository(ctx, ctx.Doer, owner, repo_module.CreateRepoOptions{
 | 
			
		||||
	repo, err := repo_service.CreateRepository(ctx, ctx.Doer, owner, repo_service.CreateRepoOptions{
 | 
			
		||||
		Name:          opt.Name,
 | 
			
		||||
		Description:   opt.Description,
 | 
			
		||||
		IssueLabels:   opt.IssueLabels,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user