aboutsummaryrefslogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js16
1 files changed, 0 insertions, 16 deletions
diff --git a/index.js b/index.js
index 7b06459..2b78b86 100644
--- a/index.js
+++ b/index.js
@@ -8,22 +8,6 @@ const app = express();
// Init middleware
// app.use(logger);
-// Gets all members
-app.get('/api/members', (req, res) => res.json(members));
-
-// Get single member
-app.get('/api/members/:id', (req, res) => {
- const found = members.some(member => member.id === parseInt(req.params.id));
-
- if(found) {
- res.json(members.filter(member =>
- member.id === parseInt(req.params.id)));
- } else {
- res.status(400).json({ msg: `No member with the id of ${req.params.id}`
- });
- }
-});
-
// Set static directory
app.use(express.static(path.join(__dirname, 'public')));