anything-llm/server/utils/http/index.js

15 lines
231 B
JavaScript
Raw Normal View History

2023-06-04 04:28:07 +02:00
function reqBody(request) {
2023-06-08 06:31:35 +02:00
return typeof request.body === "string"
2023-06-04 04:28:07 +02:00
? JSON.parse(request.body)
: request.body;
}
function queryParams(request) {
return request.query;
}
module.exports = {
reqBody,
queryParams,
};