Update to remove CORS exclusions
This commit is contained in:
parent
b1936e89bc
commit
d1549bf553
@ -3,7 +3,6 @@ import express from 'express';
|
|||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import { subHours, subSeconds } from 'date-fns'
|
import { subHours, subSeconds } from 'date-fns'
|
||||||
import cors from 'cors';
|
|
||||||
import {
|
import {
|
||||||
createDB,
|
createDB,
|
||||||
createTable,
|
createTable,
|
||||||
@ -42,8 +41,6 @@ const dataPointsTable = createTable<DataPoint>(db, 'dataPoints')();
|
|||||||
json(),
|
json(),
|
||||||
);
|
);
|
||||||
|
|
||||||
app.use(cors());
|
|
||||||
|
|
||||||
app.get('/:name', async (req: any, res: any) => {
|
app.get('/:name', async (req: any, res: any) => {
|
||||||
const startTime = subHours(new Date(), 24);
|
const startTime = subHours(new Date(), 24);
|
||||||
const result = await many(dataPointsTable, {
|
const result = await many(dataPointsTable, {
|
||||||
|
Loading…
Reference in New Issue
Block a user