From 635628cf30460a75d3a870394ad66db91f3bea9f Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 4 Jan 2017 14:11:48 -0500 Subject: Removing old signup team API (#4950) --- webapp/client/client.jsx | 12 ---- .../components/signup_team_complete.jsx | 81 ---------------------- webapp/tests/client_team.test.jsx | 16 ----- 3 files changed, 109 deletions(-) delete mode 100644 webapp/components/signup_team_complete/components/signup_team_complete.jsx (limited to 'webapp') diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx index e5fe25fcd..ba42d7ae8 100644 --- a/webapp/client/client.jsx +++ b/webapp/client/client.jsx @@ -446,18 +446,6 @@ export default class Client { end(this.handleResponse.bind(this, 'exportTeam', success, error)); } - signupTeam(email, success, error) { - request. - post(`${this.getTeamsRoute()}/signup`). - set(this.defaultHeaders). - type('application/json'). - accept('application/json'). - send({email}). - end(this.handleResponse.bind(this, 'signupTeam', success, error)); - - this.track('api', 'api_teams_signup'); - } - adminResetMfa(userId, success, error) { const data = {}; data.user_id = userId; diff --git a/webapp/components/signup_team_complete/components/signup_team_complete.jsx b/webapp/components/signup_team_complete/components/signup_team_complete.jsx deleted file mode 100644 index 78c591375..000000000 --- a/webapp/components/signup_team_complete/components/signup_team_complete.jsx +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import BrowserStore from 'stores/browser_store.jsx'; - -import {FormattedMessage} from 'react-intl'; - -import React from 'react'; -import {Link, browserHistory} from 'react-router/es6'; - -export default class SignupTeamComplete extends React.Component { - constructor(props) { - super(props); - - this.updateParent = this.updateParent.bind(this); - } - componentWillMount() { - const data = JSON.parse(this.props.location.query.d); - this.hash = this.props.location.query.h; - - var initialState = BrowserStore.getGlobalItem(this.hash); - - if (!initialState) { - initialState = {}; - initialState.wizard = 'welcome'; - initialState.team = {}; - initialState.team.email = data.email; - initialState.team.allowed_domains = ''; - initialState.invites = []; - initialState.invites.push(''); - initialState.invites.push(''); - initialState.invites.push(''); - initialState.user = {}; - initialState.hash = this.hash; - initialState.data = this.props.location.query.d; - } - - this.setState(initialState); - } - componentDidMount() { - browserHistory.push('/signup_team_complete/welcome'); - } - updateParent(state, skipSet) { - BrowserStore.setGlobalItem(this.hash, state); - - if (!skipSet) { - this.setState(state); - browserHistory.push('/signup_team_complete/' + state.wizard); - } - } - render() { - return ( -
-
- - - - -
-
-
-
- {React.cloneElement(this.props.children, { - state: this.state, - updateParent: this.updateParent - })} -
-
-
-
- ); - } -} - -SignupTeamComplete.defaultProps = { -}; - -SignupTeamComplete.propTypes = { - location: React.PropTypes.object, - children: React.PropTypes.node -}; diff --git a/webapp/tests/client_team.test.jsx b/webapp/tests/client_team.test.jsx index 012259d0c..5fac2da6d 100644 --- a/webapp/tests/client_team.test.jsx +++ b/webapp/tests/client_team.test.jsx @@ -22,22 +22,6 @@ describe('Client.Team', function() { }); }); - it('signupTeam', function(done) { - var client = TestHelper.createClient(); - var email = TestHelper.fakeEmail(); - - client.signupTeam( - email, - function(data) { - assert.equal(data.email, email); - done(); - }, - function(err) { - done(new Error(err.message)); - } - ); - }); - it('createTeam', function(done) { var client = TestHelper.createClient(); var team = TestHelper.fakeTeam(); -- cgit v1.2.3-1-g7c22