refactor: rewrite how the data is processes, as it's an array of chunks now
This commit is contained in:
parent
71ed20ff13
commit
8df32ad402
|
@ -33,9 +33,9 @@ class HyperTransport implements grpc.Transport {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret.data) {
|
if (ret.data) {
|
||||||
this.options.onHeaders(new grpc.Metadata(), 200);
|
ret.data?.forEach((item: number[]) => {
|
||||||
ret.data = new Uint8Array(Object.values(ret.data));
|
this.options.onChunk(Uint8Array.from(item));
|
||||||
this.options.onChunk(ret.data);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.options.onEnd();
|
this.options.onEnd();
|
||||||
|
|
Loading…
Reference in New Issue