Spaces:
Runtime error
Runtime error
pc 6
Browse files
src/controllers/glucosa-controller.js
CHANGED
|
@@ -5,6 +5,7 @@ async function getAllGlucosa(req, res) {
|
|
| 5 |
const registros = await Glucosa.find();
|
| 6 |
res.json(registros);
|
| 7 |
} catch (error) {
|
|
|
|
| 8 |
res
|
| 9 |
.status(500)
|
| 10 |
.json({ error: "Error al obtener los registros de glucosa" });
|
|
|
|
| 5 |
const registros = await Glucosa.find();
|
| 6 |
res.json(registros);
|
| 7 |
} catch (error) {
|
| 8 |
+
console.error("Error al conectar a MongoDB:", error.message);
|
| 9 |
res
|
| 10 |
.status(500)
|
| 11 |
.json({ error: "Error al obtener los registros de glucosa" });
|