Fix store add bug
This commit is contained in:
parent
4dd50a2f57
commit
577bd31a25
|
@ -22,10 +22,14 @@ class FileTreePage extends React.Component {
|
|||
|
||||
getStore() {
|
||||
StoreBackend.getStore(this.state.owner, this.state.storeName)
|
||||
.then((store) => {
|
||||
.then((res) => {
|
||||
if (res?.status !== "error") {
|
||||
this.setState({
|
||||
store: store,
|
||||
store: res,
|
||||
});
|
||||
} else {
|
||||
Setting.showMessage("error", res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ class StoreEditPage extends React.Component {
|
|||
this.setState({
|
||||
storeName: this.state.store.name,
|
||||
});
|
||||
this.props.history.push(`/stores/${this.state.store.name}`);
|
||||
this.props.history.push(`/stores/${this.state.store.owner}/${this.state.store.name}`);
|
||||
} else {
|
||||
Setting.showMessage("error", `failed to save: server side failure`);
|
||||
this.updateStoreField('name', this.state.storeName);
|
||||
|
|
Loading…
Reference in New Issue