mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-19 02:13:50 +08:00
feat: show 404 error for non-existent objects in edit pages
This commit is contained in:
@ -36,6 +36,11 @@ class TokenEditPage extends React.Component {
|
||||
getToken() {
|
||||
TokenBackend.getToken("admin", this.state.tokenName)
|
||||
.then((token) => {
|
||||
if (token === null) {
|
||||
this.props.history.push("/404");
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
token: token,
|
||||
});
|
||||
|
Reference in New Issue
Block a user