Skip to content

Commit

Permalink
Merge pull request #524 from shnrndk/subscriptionpoliciesissues
Browse files Browse the repository at this point in the history
Fixing Limited view of subscription policies in Publisher portal issue
  • Loading branch information
piyumaldk authored Jan 4, 2024
2 parents 42d9c6a + 056b936 commit 4a503b7
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import FormControlLabel from '@material-ui/core/FormControlLabel';
import Paper from '@material-ui/core/Paper';
import API from 'AppData/api';
import { isRestricted } from 'AppData/AuthManager';
import Configurations from 'Config';

const styles = (theme) => ({
subscriptionPoliciesPaper: {
Expand Down Expand Up @@ -61,7 +62,15 @@ class SubscriptionPoliciesManage extends Component {
componentDidMount() {
const { api } = this.props;
const isAsyncAPI = (api.type === 'WS' || api.type === 'WEBSUB' || api.type === 'SSE' || api.type === 'ASYNC');
const policyPromise = isAsyncAPI ? API.asyncAPIPolicies() : API.policies('subscription');
const limit = Configurations.app.subscriptionPolicyLimit;
let policyPromise;
if (isAsyncAPI) {
policyPromise = API.asyncAPIPolicies();
} else if (limit) {
policyPromise = API.policies('subscription', limit);
} else {
policyPromise = API.policies('subscription');
}
policyPromise
.then((res) => {
this.setState({ subscriptionPolicies: res.body.list });
Expand Down

0 comments on commit 4a503b7

Please sign in to comment.