dataRouter.js 435 Bytes
Newer Older
1
2
import express from "express";
import routes from "../routes";
3
4
import {
  getDataInput,
5
  getLocCode,
6
7
  getUserWeatherData,
} from "../controllers/dataController";
8
import { onlyPrivate } from "../middlewares";
9
10
11
12

const dataRouter = express.Router();

dataRouter.get(routes.dataInput, getDataInput);
13
dataRouter.get(routes.dataUser, onlyPrivate, getUserWeatherData);
14
dataRouter.get(routes.locCode, getLocCode);
15
16

export default dataRouter;