feat: fix getProviders() owner bug in product edit page

This commit is contained in:
Yang Luo 2024-05-01 18:04:36 +08:00
parent 9eb4b12041
commit d43d58dee2

View File

@ -41,7 +41,7 @@ class ProductEditPage extends React.Component {
UNSAFE_componentWillMount() { UNSAFE_componentWillMount() {
this.getProduct(); this.getProduct();
this.getOrganizations(); this.getOrganizations();
this.getPaymentProviders(); this.getPaymentProviders(this.state.organizationName);
} }
getProduct() { getProduct() {
@ -67,8 +67,8 @@ class ProductEditPage extends React.Component {
}); });
} }
getPaymentProviders() { getPaymentProviders(organizationName) {
ProviderBackend.getProviders(this.props.account.owner) ProviderBackend.getProviders(organizationName)
.then((res) => { .then((res) => {
if (res.status === "ok") { if (res.status === "ok") {
this.setState({ this.setState({