Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //get profile by id
- app.get('/profiles/:id', (req, res) => {
- const profile = profiles.find(p => p.id === parseInt(req.params.id));
- //error hendl
- if(!profile) res.send('Nije pronadjen');
- else res.send(profile);
- });
Advertisement
Add Comment
Please, Sign In to add comment