forked from Seneca-CDOT/telescope
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Seneca-CDOT#707 add routes - work in progress
- Loading branch information
1 parent
21f6188
commit 5a38a87
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const express = require('express'); | ||
|
||
const { logger } = require('../../utils/logger'); | ||
const feeds = require('../../data/feeds'); | ||
const { getFeeds } = require('../../utils/storage'); | ||
|
||
const router = express.Router(); | ||
|
||
router.get('/', async (req, res) => { | ||
// this route will return all users. | ||
/* [{id: "some-user-id", url: "/users/some-user-id", ...] */ | ||
}); | ||
|
||
router.get('/:id', async (req, res) => { | ||
// this route will return one user, and there list of feeds, this can be utilized in two places. One our search function, and | ||
// two for our add feed component to show a list of feeds that have been attached to the user. | ||
/* this should return | ||
{ id: "some-ud-id, url: "/users/someuserId/ (multiple URLs?)} | ||
*/ | ||
}); | ||
|
||
module.exports = router; |