Improved handling of invalid incoming and outgoing webhooks
Этот коммит содержится в:
@@ -72,6 +72,7 @@ export default class AddIncomingWebhook extends React.Component {
|
|||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
saving: false,
|
||||||
serverError: err.message
|
serverError: err.message
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -125,6 +126,7 @@ export default class AddIncomingWebhook extends React.Component {
|
|||||||
<input
|
<input
|
||||||
id='displayName'
|
id='displayName'
|
||||||
type='text'
|
type='text'
|
||||||
|
maxLength='64'
|
||||||
className='form-control'
|
className='form-control'
|
||||||
value={this.state.displayName}
|
value={this.state.displayName}
|
||||||
onChange={this.updateDisplayName}
|
onChange={this.updateDisplayName}
|
||||||
@@ -145,6 +147,7 @@ export default class AddIncomingWebhook extends React.Component {
|
|||||||
<input
|
<input
|
||||||
id='description'
|
id='description'
|
||||||
type='text'
|
type='text'
|
||||||
|
maxLength='128'
|
||||||
className='form-control'
|
className='form-control'
|
||||||
value={this.state.description}
|
value={this.state.description}
|
||||||
onChange={this.updateDescription}
|
onChange={this.updateDescription}
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ export default class AddOutgoingWebhook extends React.Component {
|
|||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
saving: false,
|
||||||
serverError: err.message
|
serverError: err.message
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -157,6 +158,7 @@ export default class AddOutgoingWebhook extends React.Component {
|
|||||||
<input
|
<input
|
||||||
id='displayName'
|
id='displayName'
|
||||||
type='text'
|
type='text'
|
||||||
|
maxLength='64'
|
||||||
className='form-control'
|
className='form-control'
|
||||||
value={this.state.displayName}
|
value={this.state.displayName}
|
||||||
onChange={this.updateDisplayName}
|
onChange={this.updateDisplayName}
|
||||||
@@ -177,6 +179,7 @@ export default class AddOutgoingWebhook extends React.Component {
|
|||||||
<input
|
<input
|
||||||
id='description'
|
id='description'
|
||||||
type='text'
|
type='text'
|
||||||
|
maxLength='128'
|
||||||
className='form-control'
|
className='form-control'
|
||||||
value={this.state.description}
|
value={this.state.description}
|
||||||
onChange={this.updateDescription}
|
onChange={this.updateDescription}
|
||||||
@@ -215,6 +218,7 @@ export default class AddOutgoingWebhook extends React.Component {
|
|||||||
<textarea
|
<textarea
|
||||||
id='triggerWords'
|
id='triggerWords'
|
||||||
rows='3'
|
rows='3'
|
||||||
|
maxLength='1000'
|
||||||
className='form-control'
|
className='form-control'
|
||||||
value={this.state.triggerWords}
|
value={this.state.triggerWords}
|
||||||
onChange={this.updateTriggerWords}
|
onChange={this.updateTriggerWords}
|
||||||
@@ -235,6 +239,7 @@ export default class AddOutgoingWebhook extends React.Component {
|
|||||||
<textarea
|
<textarea
|
||||||
id='callbackUrls'
|
id='callbackUrls'
|
||||||
rows='3'
|
rows='3'
|
||||||
|
maxLength='1000'
|
||||||
className='form-control'
|
className='form-control'
|
||||||
value={this.state.callbackUrls}
|
value={this.state.callbackUrls}
|
||||||
onChange={this.updateCallbackUrls}
|
onChange={this.updateCallbackUrls}
|
||||||
|
|||||||
@@ -1182,10 +1182,10 @@ export function addIncomingHook(hook, success, error) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
dispatchError(err, 'addIncomingHook');
|
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
error(err);
|
error(err);
|
||||||
|
} else {
|
||||||
|
dispatchError(err, 'addIncomingHook');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -1205,10 +1205,10 @@ export function addOutgoingHook(hook, success, error) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
dispatchError(err, 'addOutgoingHook');
|
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
error(err);
|
error(err);
|
||||||
|
} else {
|
||||||
|
dispatchError(err, 'addOutgoingHook');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user