Closed lfmunoz closed 8 months ago
app.get('/admin/test', async (req, res) => { const result = await test.queryDocuments(req.query); res.status(result.status).send(result.body); });
does not return the expected result
it returns the body of:
{ "headers": { "content-type": "application/json", "access-control-allow-origin": "*", "access-control-allow-methods": "GET, PUT, POST, DELETE, OPTIONS", "access-control-allow-headers": "Content-Type, Authorization, Content-Length, X-Requested-With" }, "body": "{\"currentPage\":1,\"pageSize\":25,\"totalResults\" "isBase64Encoded": false }
But the expected body is
{"currentPage\":1,\"pageSize\":25,\"totalResults ...
can't figure out how to send just the body
Never mind figured out it does that when status is undefined. Kinda tricky don't think that is the best default behavior.
does not return the expected result
it returns the body of:
But the expected body is
can't figure out how to send just the body