From 094b70673a365baa7894250e68b5968f16c9ef32 Mon Sep 17 00:00:00 2001 From: Tad Decker Date: Sat, 11 Nov 2023 18:49:10 -0700 Subject: [PATCH] bug fix --- app.js | 1 + package.json | 1 + src/controllers/noteController.js | 1 + 3 files changed, 3 insertions(+) diff --git a/app.js b/app.js index f420843..04ebcfd 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,7 @@ import express from 'express' import dotenv from 'dotenv' import apiRoutes from './src/routes/apiRoutes.js' +import cors from 'cors' dotenv.config() const port = process.env.PORT ?? 80 diff --git a/package.json b/package.json index 04d3543..6775758 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "dependencies": { "@azure/cosmos": "^4.0.0", "@azure/identity": "^3.3.2", + "cors": "^2.8.5", "dotenv": "^16.3.1", "express": "^4.18.2" } diff --git a/src/controllers/noteController.js b/src/controllers/noteController.js index c67da23..a1dbe98 100644 --- a/src/controllers/noteController.js +++ b/src/controllers/noteController.js @@ -18,6 +18,7 @@ const notesController = { * @param {Object} res */ async getNotes(req, res) { + console.log('IN GET NOTES') try { const userId = req.query.userId ?? null if (!userId) {