mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* PLT-5860 Updated copyright date in about modal * PLT-5860 Updated copyright notice in JSX files * PLT-5860 Updated copyright notice in go files * Fixed misc copyright dates * Fixed component snapshots
33 lines
977 B
JavaScript
33 lines
977 B
JavaScript
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import * as AsyncClient from 'utils/async_client.jsx';
|
|
import {browserHistory} from 'react-router/es6';
|
|
|
|
import AbstractIncomingWebhook from './abstract_incoming_webhook.jsx';
|
|
|
|
export default class AddIncomingWebhook extends AbstractIncomingWebhook {
|
|
performAction(hook) {
|
|
AsyncClient.addIncomingHook(
|
|
hook,
|
|
(data) => {
|
|
browserHistory.push(`/${this.props.team.name}/integrations/confirm?type=incoming_webhooks&id=${data.id}`);
|
|
},
|
|
(err) => {
|
|
this.setState({
|
|
saving: false,
|
|
serverError: err.message
|
|
});
|
|
}
|
|
);
|
|
}
|
|
|
|
header() {
|
|
return {id: 'integrations.add', defaultMessage: 'Add'};
|
|
}
|
|
|
|
footer() {
|
|
return {id: 'add_incoming_webhook.save', defaultMessage: 'Save'};
|
|
}
|
|
}
|