Commit 723fdf3 1 parent b701a81 commit 723fdf3 Copy full SHA for 723fdf3
File tree 3 files changed +6
-4
lines changed
public/components/views/home/report
src/http-server/endpoints
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 96
96
"@topcli/prompts" : " ^1.9.0" ,
97
97
"@topcli/spinner" : " ^2.1.2" ,
98
98
"cacache" : " ^18.0.2" ,
99
- "co-body" : " ^6.1.0" ,
100
99
"dotenv" : " ^16.4.4" ,
101
100
"filenamify" : " ^6.0.0" ,
102
101
"highlightjs-line-numbers.js" : " ^2.8.0" ,
Original file line number Diff line number Diff line change @@ -24,7 +24,10 @@ export class PopupReport {
24
24
body : JSON . stringify ( {
25
25
title,
26
26
includesAllDeps
27
- } )
27
+ } ) ,
28
+ headers : {
29
+ "Content-Type" : "application/json"
30
+ }
28
31
} ) . then ( async ( response ) => {
29
32
const { data : json } = await response . json ( ) ;
30
33
const url = window . URL . createObjectURL (
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ import fs from "node:fs";
4
4
// Import Third-party Dependencikes
5
5
import { report } from "@nodesecure/report" ;
6
6
import send from "@polka/send-type" ;
7
- import * as coBody from "co-body" ;
8
7
9
8
// Import Internal Dependencies
10
9
import { context } from "../context.js" ;
10
+ import { bodyParser } from "../bodyParser.js" ;
11
11
12
12
// TODO: provide a non-file-based API on RC side ?
13
13
const kReportPayload = {
@@ -46,7 +46,7 @@ const kReportPayload = {
46
46
} ;
47
47
48
48
export async function post ( req , res ) {
49
- const body = await coBody . json ( req ) ;
49
+ const body = await bodyParser ( req ) ;
50
50
const { title, includesAllDeps } = body ;
51
51
52
52
const { dataFilePath } = context . getStore ( ) ;
You can’t perform that action at this time.
0 commit comments