Fix notification copy on add & update source

pull/2496/head
Jared Scheib 2017-12-06 14:23:49 -08:00
parent 283d2eefcd
commit 731c3ab47c
1 changed files with 3 additions and 1 deletions

View File

@ -131,10 +131,12 @@ class SourcePage extends Component {
_createSource = () => {
const {source} = this.state
const {notify} = this.props
createSource(source)
.then(({data: sourceFromServer}) => {
this.props.addSourceAction(sourceFromServer)
this._redirect(sourceFromServer)
notify('success', `New source ${source.name} added`)
})
.catch(error => {
this.handleError('Unable to create source', error)
@ -148,7 +150,7 @@ class SourcePage extends Component {
.then(({data: sourceFromServer}) => {
this.props.updateSourceAction(sourceFromServer)
this._redirect(sourceFromServer)
notify('success', `New source ${source.name} added`)
notify('success', `Source ${source.name} updated`)
})
.catch(error => {
this.handleError('Unable to update source', error)