mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 20:23:50 +08:00
feat: show 404 error for non-existent objects in edit pages
This commit is contained in:
@ -50,6 +50,11 @@ class AdapterEditPage extends React.Component {
|
||||
AdapterBackend.getAdapter("admin", this.state.adapterName)
|
||||
.then((res) => {
|
||||
if (res.status === "ok") {
|
||||
if (res.data === null) {
|
||||
this.props.history.push("/404");
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
adapter: res.data,
|
||||
});
|
||||
|
Reference in New Issue
Block a user