Update index.js
Browse files
index.js
CHANGED
|
@@ -144,13 +144,13 @@ app.use((req, res, next) => {
|
|
| 144 |
// Middleware untuk mencatat detail request
|
| 145 |
app.use((req, res, next) => {
|
| 146 |
console.log(`Received ${req.method} request for ${req.url}`);
|
| 147 |
-
console.log('Request Headers:', req.headers);
|
| 148 |
if (req.method === 'POST' || req.method === 'PUT') {
|
| 149 |
console.log('Request Body:', req.body);
|
| 150 |
}
|
| 151 |
next();
|
| 152 |
});
|
| 153 |
|
|
|
|
| 154 |
app.post('/', async (req, res) => {
|
| 155 |
const { content, user, prompt, webSearchMode } = req.body;
|
| 156 |
if (!content) {
|
|
|
|
| 144 |
// Middleware untuk mencatat detail request
|
| 145 |
app.use((req, res, next) => {
|
| 146 |
console.log(`Received ${req.method} request for ${req.url}`);
|
|
|
|
| 147 |
if (req.method === 'POST' || req.method === 'PUT') {
|
| 148 |
console.log('Request Body:', req.body);
|
| 149 |
}
|
| 150 |
next();
|
| 151 |
});
|
| 152 |
|
| 153 |
+
|
| 154 |
app.post('/', async (req, res) => {
|
| 155 |
const { content, user, prompt, webSearchMode } = req.body;
|
| 156 |
if (!content) {
|