refactor: rewrite how the data is processes, as it's an array of chunks now

This commit is contained in:
Derrick Hammer 2023-10-23 19:42:46 -04:00
parent 71ed20ff13
commit 8df32ad402
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 3 deletions

View File

@ -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();