Skip to content

Commit e09fdcf

Browse files
Fix/prod hot fixes (#636)
* fix(prod-bugs): wiki and hide copy file action * fix(wiki): pagination
1 parent 6cfb3ff commit e09fdcf

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/app/shared/services/wiki.service.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,13 @@ export class WikiService {
9292
}
9393

9494
getWikiList(resourceType: ResourceType, resourceId: string): Observable<WikisWithMeta> {
95+
const params: Record<string, unknown> = {
96+
'page[size]': 100,
97+
};
98+
9599
const baseUrl = this.getBaseUrl(resourceType, resourceId);
96100

97-
return this.jsonApiService.get<WikiJsonApiResponseWithMeta>(baseUrl).pipe(
101+
return this.jsonApiService.get<WikiJsonApiResponseWithMeta>(baseUrl, params).pipe(
98102
map((response) => ({
99103
wikis: response.data.map((wiki) => WikiMapper.fromGetWikiResponse(wiki)),
100104
meta: response.meta,
@@ -104,14 +108,19 @@ export class WikiService {
104108

105109
getComponentsWikiList(resourceType: ResourceType, resourceId: string): Observable<ComponentWiki[]> {
106110
const resourcePath = this.urlMap.get(resourceType);
111+
const params: Record<string, unknown> = {
112+
embed: 'wikis',
113+
'page[size]': 100,
114+
};
107115
return this.jsonApiService
108-
.get<ComponentsWikiJsonApiResponse>(`${this.apiUrl}/${resourcePath}/${resourceId}/children/?embed=wikis`)
116+
.get<ComponentsWikiJsonApiResponse>(`${this.apiUrl}/${resourcePath}/${resourceId}/children/`, params)
109117
.pipe(map((response) => response.data.map((component) => WikiMapper.fromGetComponentsWikiResponse(component))));
110118
}
111119

112120
getWikiVersions(wikiId: string): Observable<WikiVersion[]> {
113121
const params: Record<string, unknown> = {
114122
embed: 'user',
123+
'page[size]': 100,
115124
'fields[users]': 'full_name',
116125
};
117126

0 commit comments

Comments
 (0)