Skip to content

Commit

Permalink
fix dis level
Browse files Browse the repository at this point in the history
  • Loading branch information
Germey Tsui committed Jan 7, 2024
1 parent 62ac280 commit f902314
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/operators/distribution/operator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,17 @@ class DistributionStatusService {

export const distributionStatusOperator = new DistributionStatusService();

export interface IDistributionLevelQuery {
limit?: number;
}

class DistributionLevelService {
key = 'distribution-levels';

async getAll(): Promise<AxiosResponse<IDistributionLevelListResponse>> {
return await httpClient.get(`/${this.key}/`);
async getAll(query: IDistributionLevelQuery): Promise<AxiosResponse<IDistributionLevelListResponse>> {
return await httpClient.get(`/${this.key}/`, {
params: query
});
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/pages/distribution/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,9 @@ export default defineComponent({
}
},
async onFetchDistributionLevels() {
const { data } = await distributionLevelOperator.getAll();
const { data } = await distributionLevelOperator.getAll({
limit: 20
});
this.distributionLevels = data.items;
},
async onFetchInvitees() {
Expand Down

0 comments on commit f902314

Please sign in to comment.