Skip to content

Commit 8a3b2e5

Browse files
committed
fix cvs not sending to rtcv
1 parent 7704f03 commit 8a3b2e5

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

denoexample.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/deno/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export class RtCvClient {
33
private async fetch<T>(path: string, body?: BodyInit | null | undefined): Promise<T> {
44
if (!this.serverOrigin) throw 'it seems like you are running this scraper outside of rtcv_scraper_client, make sure you are using rtcv_scraper_client to run this scraper'
55

6-
const req = await fetch(this.serverOrigin + path, { body: body })
6+
const req = await fetch(this.serverOrigin + path, { method: 'POST', body })
77
if (req.status >= 400) throw await req.text()
88
return await req.json()
99
}

webserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func startWebserver(env Env, api *API) {
5050
api.SetCacheEntry(referenceNr, time.Hour*72)
5151
hasMatch = true
5252
} else {
53-
scanCVBody := append(append([]byte(`{"cv":`), body...), '}')
53+
scanCVBody := json.RawMessage(append(append([]byte(`{"cv":`), body...), '}'))
5454

5555
for idx, conn := range api.connections {
5656
var response struct {

0 commit comments

Comments
 (0)