diff --git a/software/backend/routes/band.routes.ts b/software/backend/routes/band.routes.ts index 4267a19..6c0a322 100644 --- a/software/backend/routes/band.routes.ts +++ b/software/backend/routes/band.routes.ts @@ -117,6 +117,9 @@ band.get("/band/:name", (req: Request, res: Response) => { res.status(200).json(band) }) + .catch(e => { + res.status(404).send() + }) }) diff --git a/software/backend/routes/concert.routes.ts b/software/backend/routes/concert.routes.ts index cca6830..c0a6654 100644 --- a/software/backend/routes/concert.routes.ts +++ b/software/backend/routes/concert.routes.ts @@ -110,6 +110,9 @@ concert.get("/concert/:id", (req: Request, res: Response) => { res.status(200).json(concert) }) + .catch(e => { + res.status(404).send() + }) }) diff --git a/software/backend/routes/location.routes.ts b/software/backend/routes/location.routes.ts index cda05ef..12a4b17 100644 --- a/software/backend/routes/location.routes.ts +++ b/software/backend/routes/location.routes.ts @@ -98,6 +98,9 @@ location.get("/location/:urlName", (req: Request, res: Response) => { res.status(200).json(location) }) + .catch(e => { + res.status(404).send() + }) }) diff --git a/software/backend/routes/order.routes.ts b/software/backend/routes/order.routes.ts index 62b1a93..ea11673 100644 --- a/software/backend/routes/order.routes.ts +++ b/software/backend/routes/order.routes.ts @@ -61,7 +61,6 @@ order.get("/:id", (req: Request, res: Response) => { // Place a new order order.post("/", (req: Request, res: Response) => { - console.log(req.body.tickets) Order.create(req.body) .then(async order => { for (let ticket of req.body.tickets) { diff --git a/software/src/App.vue b/software/src/App.vue index 461bc97..345b01b 100644 --- a/software/src/App.vue +++ b/software/src/App.vue @@ -8,10 +8,12 @@ import { usePreferencesStore } from './stores/preferences.store'; import { useFeedbackStore } from './stores/feedback.store'; import companyFooter from './components/navigation/companyFooter.vue'; import urlBar from './components/navigation/urlBar.vue'; +import { useRouter } from 'vue-router'; const preferencesStore = usePreferencesStore() const feedbackStore = useFeedbackStore() const theme = useTheme() +const router = useRouter() theme.global.name.value = preferencesStore.theme @@ -20,6 +22,13 @@ theme.global.name.value = preferencesStore.theme watch(() => preferencesStore.language, () => { i18n.global.locale = preferencesStore.language }, { immediate: true }) + +watch(() => feedbackStore.notFound, () => { + if (feedbackStore.notFound) { + feedbackStore.notFound = false + router.push("/404") + } +})