From d1549bf5539d6a610ea7a2bf8c7d123214f4544b Mon Sep 17 00:00:00 2001 From: William Moore Date: Thu, 15 Jun 2023 15:01:29 -0500 Subject: [PATCH] Update to remove CORS exclusions --- src/index.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 42aac5d..1303424 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,6 @@ import express from 'express'; import 'dotenv/config'; import fetch from 'node-fetch'; import { subHours, subSeconds } from 'date-fns' -import cors from 'cors'; import { createDB, createTable, @@ -38,12 +37,10 @@ const dataPointsTable = createTable(db, 'dataPoints')(); const app = express(); app.use( - '/', - json(), + '/', + json(), ); - app.use(cors()); - app.get('/:name', async (req: any, res: any) => { const startTime = subHours(new Date(), 24); const result = await many(dataPointsTable, {