-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
32 lines (26 loc) · 1.18 KB
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"use strict";
const express = require("express");
const router = express.Router();
const dashboard = require("./controllers/dashboard.js");
const about = require("./controllers/about.js");
const home = require("./controllers/home.js");
const station = require("./controllers/station.js");
const accounts = require("./controllers/accounts.js");
router.get("/", accounts.index);
router.get("/login", accounts.login);
router.get("/signup", accounts.signup);
router.get("/logout", accounts.logout);
router.post("/register", accounts.register);
router.post("/authenticate", accounts.authenticate);
router.get("/dashboard", dashboard.index);
router.get("/about", about.index);
router.get("/home", home.index);
router.get("/station/:id", station.index);
router.get("/station/:id/deletereading/:readingid", station.deleteReading);
router.get("/dashboard/deletestation/:id", dashboard.deleteStation);
router.post("/station/:id/addreading", station.addReading);
router.post("/dashboard/addstation", dashboard.addStation);
router.post("/station/:id/addreport", station.addreport);
router.get("/my-account", accounts.userDetails);
router.post("/updateuserdetails", accounts.updateUserDetails);
module.exports = router;