|
|
|
@@ -44,7 +44,7 @@ class Organizations::TeamsController < Organizations::BaseController |
|
|
|
def create |
|
|
|
ActiveRecord::Base.transaction do |
|
|
|
if @organization.teams.count >= 50 |
|
|
|
return render_forbidden("组织的团队数量已超过限制!") |
|
|
|
return tip_exception("组织的团队数量已超过限制!") |
|
|
|
else |
|
|
|
Organizations::CreateTeamForm.new(team_params).validate! |
|
|
|
@team = Organizations::Teams::CreateService.call(current_user, @organization, team_params) |
|
|
|
|