diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-06 16:06:33 +0300 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-06 16:58:53 +0300 |
commit | 597639c09662b5f43ff966938c5e55e485a1563c (patch) | |
tree | f15d938c29a782c1cd99a10555e32c9bc617e74a | |
parent | 449ecd6c68150a7d6d97c3070ffbc3f8b1e372dd (diff) |
Fix eslint
-rw-r--r-- | app/assets/javascripts/behaviors/bind_in_out.js (renamed from app/assets/javascripts/behaviors/bind_in_out.js.es6) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 2 | ||||
-rw-r--r-- | app/services/groups/create_service.rb | 9 | ||||
-rw-r--r-- | spec/javascripts/behaviors/bind_in_out_spec.js (renamed from spec/javascripts/behaviors/bind_in_out_spec.js.es6) | 4 |
4 files changed, 6 insertions, 9 deletions
diff --git a/app/assets/javascripts/behaviors/bind_in_out.js.es6 b/app/assets/javascripts/behaviors/bind_in_out.js index 1cc0fc750b5..1cc0fc750b5 100644 --- a/app/assets/javascripts/behaviors/bind_in_out.js.es6 +++ b/app/assets/javascripts/behaviors/bind_in_out.js diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 1fe8c937f27..31f10f89245 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -35,7 +35,7 @@ /* global Labels */ /* global Shortcuts */ -import BindInOut from './behaviors/bind_in_out.js.es6'; +import BindInOut from './behaviors/bind_in_out'; import GroupsList from './groups_list'; import ProjectsList from './projects_list'; diff --git a/app/services/groups/create_service.rb b/app/services/groups/create_service.rb index 6ef78c3e677..c4e9b8fd8e0 100644 --- a/app/services/groups/create_service.rb +++ b/app/services/groups/create_service.rb @@ -23,13 +23,10 @@ module Groups @group.name ||= @group.path.dup if create_chat_team? - begin - response = Mattermost::CreateTeamService.new(@group, current_user).execute - - @group.build_chat_team(name: response['name'], team_id: response['id']) - end - + response = Mattermost::CreateTeamService.new(@group, current_user).execute return @group if @group.errors.any? + + @group.build_chat_team(name: response['name'], team_id: response['id']) end @group.save diff --git a/spec/javascripts/behaviors/bind_in_out_spec.js.es6 b/spec/javascripts/behaviors/bind_in_out_spec.js index 4f889c58bcd..dd9ab33289f 100644 --- a/spec/javascripts/behaviors/bind_in_out_spec.js.es6 +++ b/spec/javascripts/behaviors/bind_in_out_spec.js @@ -1,5 +1,5 @@ -import BindInOut from '~/behaviors/bind_in_out.js.es6'; -import ClassSpecHelper from '../helpers/class_spec_helper.js.es6'; +import BindInOut from '~/behaviors/bind_in_out'; +import ClassSpecHelper from '../helpers/class_spec_helper'; describe('BindInOut', function () { describe('.constructor', function () { |