File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
packages/cubejs-api-gateway/src Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1980,17 +1980,17 @@ class ApiGateway {
19801980 }
19811981
19821982 protected resToResultFn ( res : ExpressResponse ) {
1983- return ( message , { status } : { status ?: number } = { } ) => ( status ? res . status ( status ) . json ( message ) : res . json ( message ) ) ;
1984- }
1985-
1986- protected resToRawResultFn ( res : ExpressResponse ) {
1987- return ( jsonBuffer : ArrayBuffer , { status } : { status ?: number } = { } ) => {
1983+ return ( message , { status } : { status ?: number } = { } ) => {
19881984 if ( status ) {
19891985 res . status ( status ) ;
19901986 }
19911987
1992- res . set ( 'Content-Type' , 'application/json' ) ;
1993- res . send ( jsonBuffer ) ;
1988+ if ( message instanceof ArrayBuffer ) {
1989+ res . set ( 'Content-Type' , 'application/json' ) ;
1990+ res . send ( message ) ;
1991+ }
1992+
1993+ res . json ( message ) ;
19941994 } ;
19951995 }
19961996
You can’t perform that action at this time.
0 commit comments