Skip to content

Commit

Permalink
add resToRawResultFn in API GW
Browse files Browse the repository at this point in the history
  • Loading branch information
KSDaemon committed Nov 29, 2024
1 parent 0dc65f5 commit 9c18870
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/cubejs-api-gateway/src/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1983,6 +1983,17 @@ class ApiGateway {
return (message, { status }: { status?: number } = {}) => (status ? res.status(status).json(message) : res.json(message));
}

protected resToRawResultFn(res: ExpressResponse) {
return (jsonBuffer: ArrayBuffer, { status }: { status?: number } = {}) => {
if (status) {
res.status(status)

Check failure on line 1989 in packages/cubejs-api-gateway/src/gateway.ts

View workflow job for this annotation

GitHub Actions / lint

Missing semicolon
}

res.set('Content-Type', 'application/json');
res.send(jsonBuffer);
};
}

protected parseQueryParam(query): Query | Query[] {
if (!query || query === 'undefined') {
throw new UserError('Query param is required');
Expand Down

0 comments on commit 9c18870

Please sign in to comment.