MCPcopy Create free account
hub / github.com/vercel/examples / DELETE

Function DELETE

solutions/aws-neptune-analytics/app/api/node/route.ts:117–134  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

115}
116
117export async function DELETE(request: Request) {
118 try {
119 const { searchParams } = new URL(request.url)
120 const id = searchParams.get('id')
121
122 const error = validateId(id)
123 if (error) return error
124
125 const result = await executeQuery(
126 'MATCH (n) WHERE id(n) = $NODE_ID DETACH DELETE n',
127 { NODE_ID: id }
128 )
129
130 return NextResponse.json(result)
131 } catch (error) {
132 return handleError(error, 'DELETE')
133 }
134}

Callers

nothing calls this directly

Calls 4

validateIdFunction · 0.70
executeQueryFunction · 0.70
handleErrorFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected