diff --git a/services/requests.js b/services/requests.js index aabf451..b13c491 100644 --- a/services/requests.js +++ b/services/requests.js @@ -28,7 +28,7 @@ const getAllActivities = (req, res) => { } const getSingleActivity = (req, res) => { - fetch('https://www.boredapi.com/api/activity') // fetch activity from bored API - https://www.boredapi.com/about + fetch('http://www.boredapi.com/api/activity') // fetch activity from bored API - https://www.boredapi.com/about .then(data => data.json()) // return a promise containing the response .then(json => res.json(json)) // extract the JSON body content from the response (specifically the activity value) and sends it to the client .catch((err) => console.log(err)) // log errors to the console @@ -51,4 +51,4 @@ const deleteAllActivites = (req, res) => { .catch(err => console.log(err)); } -module.exports = { getSingleActivity, addActivityToDB, getAllActivities, deleteAllActivites } \ No newline at end of file +module.exports = { getSingleActivity, addActivityToDB, getAllActivities, deleteAllActivites }