mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-18 05:43:49 +08:00
Fix Provider API responses
This commit is contained in:
@ -54,9 +54,13 @@ class ProductEditPage extends React.Component {
|
||||
getPaymentProviders() {
|
||||
ProviderBackend.getProviders(this.props.account.owner)
|
||||
.then((res) => {
|
||||
this.setState({
|
||||
providers: res.filter(provider => provider.category === "Payment"),
|
||||
});
|
||||
if (res.status === "ok") {
|
||||
this.setState({
|
||||
providers: res.data.filter(provider => provider.category === "Payment"),
|
||||
});
|
||||
} else {
|
||||
Setting.showMessage("error", res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user