-
Notifications
You must be signed in to change notification settings - Fork 2
/
router.js
23 lines (18 loc) · 814 Bytes
/
router.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const express = require("express");
const controller = require("./controller");
const router = express.Router();
// Search
router.route("/").get(controller.getHome)
router.route("/login").get(controller.spotifyLogin)
router.route("/callback").get(controller.callback)
router.route("/refreshtoken").get(controller.refreshToken)
router.route("/logout").get(controller.logout)
router.route("/getPlaylist").get(controller.getPlaylist)
router.route("/getTopArtists").get(controller.getTopArtists)
router.route("/getWeather").get(controller.getWeather)
// getPlaylist?key=value&key=value&key=value
// app.get('/r/:subreddit/:postId', (req, res) => {
// const {subreddit, postId } = req.params;
// res.send(`<h1>Viewing Post ID: ${postId} on the ${subreddit} subreddit</h1>`);
// })
module.exports = router;