From 311e840738c3b715e179b29ed674b6dcf2965898 Mon Sep 17 00:00:00 2001 From: Maciej Kotowski Date: Sat, 2 Oct 2021 17:26:55 +0200 Subject: [PATCH] get events --- backend/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/index.js b/backend/index.js index 1da32f0..5eb4d9b 100644 --- a/backend/index.js +++ b/backend/index.js @@ -11,9 +11,9 @@ mongoose }) .then(() => console.log("connected")) .catch((err) => console.log(err)); -app.get("/api", async (req, res) => { +app.get("/api/getEvents", async (req, res) => { try { - const event = await events.find({ mess: "one" }); + const event = await events.find(); if (!event) throw Error("something went wrong"); console.log(event); res.status(200).json(event);