enables PUT requests on frontend

This commit is contained in:
James
2018-12-06 17:52:10 -08:00
parent e044c53dfa
commit 33451d5f38
9 changed files with 58 additions and 19 deletions

View File

@@ -19,7 +19,10 @@ const withEditData = (PassedComponent, collection, config) => {
if (slug) {
api.requests.get(`${config.serverUrl}/${collection.slug}/${slug}`).then(
res => this.setState({ data: res }),
err => console.warn(err)
err => {
console.warn(err);
this.props.history.push('/not-found');
}
)
}
}