Skip to content

Commit

Permalink
fix review requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Madmat8 committed Feb 1, 2024
1 parent 0cff4a0 commit 997e71a
Showing 1 changed file with 18 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,22 @@ export class {{ serviceRelationName relation }}Impl extends JudoAxiosService imp
{{/ if }}
{{/ if }}

{{# if relation.isExportable }}
{{# if relation.isCollection }}
/**
* From: relation.isExportable, relation.isCollection
* @throws {AxiosError} With data containing {@link Array<FeedbackItem>} for status codes: 401, 403.
*/
async export(owner?: JudoIdentifiable<any>, queryCustomizer?: {{ classDataName relation.target "QueryCustomizer" }}): Promise<any> {
const path = '{{ restPath (getRelationOwnerAsClassType relation) "/" relation.name "/~export" }}';
const response = await this.axios.post(this.getPathForActor(path), queryCustomizer ?? {}, {
responseType: 'blob',
headers: owner ? {
'X-Judo-SignedIdentifier': owner.__signedIdentifier
} : undefined,
});

return response;
}
{{/ if }}
{{# if relation.isExportable and relation.isCollection }}
/**
* From: relation.isExportable, relation.isCollection
* @throws {AxiosError} With data containing {@link Array<FeedbackItem>} for status codes: 401, 403.
*/
async export(owner?: JudoIdentifiable<any>, queryCustomizer?: {{ classDataName relation.target "QueryCustomizer" }}): Promise<any> {
const path = '{{ restPath (getRelationOwnerAsClassType relation) "/" relation.name "/~export" }}';
const response = await this.axios.post(this.getPathForActor(path), queryCustomizer ?? {}, {
responseType: 'blob',
headers: owner ? {
'X-Judo-SignedIdentifier': owner.__signedIdentifier
} : undefined,
});

return response;
}
{{/ if }}

{{# if relation.isRefreshable }}
Expand Down Expand Up @@ -288,8 +286,7 @@ export class {{ serviceRelationName relation }}Impl extends JudoAxiosService imp
{{/ if }}


{{# if targetRelation.isExportable }}
{{# if targetRelation.isCollection }}
{{# if targetRelation.isExportable and targetRelation.isCollection }}
/**
* From: relation.isExportable, relation.isCollection
* @throws {AxiosError} With data containing {@link Array<FeedbackItem>} for status codes: 401, 403.
Expand All @@ -305,8 +302,7 @@ export class {{ serviceRelationName relation }}Impl extends JudoAxiosService imp

return response;
}
{{/ if }}
{{/ if }}
{{/ if }}

{{# if targetRelation.isRangeable }}
{{# neq relation.name targetRelation.name }}
Expand Down

0 comments on commit 997e71a

Please sign in to comment.