mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 20:23:50 +08:00
feat: response with status in casbin_adapter.go
(#1384)
* fix: response standardized information with status in `casbin_adapter.go` * fix: remove redundant statements
This commit is contained in:
@ -48,12 +48,14 @@ class AdapterEditPage extends React.Component {
|
||||
|
||||
getAdapter() {
|
||||
AdapterBackend.getAdapter(this.state.owner, this.state.adapterName)
|
||||
.then((adapter) => {
|
||||
this.setState({
|
||||
adapter: adapter,
|
||||
});
|
||||
.then((res) => {
|
||||
if (res.status === "ok") {
|
||||
this.setState({
|
||||
adapter: res.data,
|
||||
});
|
||||
|
||||
this.getModels(adapter.owner);
|
||||
this.getModels(this.adapter.owner);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user