diff options
Diffstat (limited to 'client/src/functions.js')
| -rw-r--r-- | client/src/functions.js | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/client/src/functions.js b/client/src/functions.js index a43dbac..e69de29 100644 --- a/client/src/functions.js +++ b/client/src/functions.js @@ -1,21 +0,0 @@ -// client/src/function.js -export async function fetchAttractions() { - - try { - - const response = await fetch("api/attractions"); - - if (!response.ok) { - const message = `An error has occured: ${response.status}`; - throw new Error(message); - } - - const attractions = await response.json(); - return attractions; - - - } catch(error) { - console.log("something went wrong when fetching attractions: ", error); - } - -} |
