From ea52e7051e71ef10ae2ae488ffce457c19456e3d Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Wed, 4 May 2022 19:09:06 -0500 Subject: [PATCH] Catch redirects for /app/ --- src/pages/app/[...appPath].astro | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/app/[...appPath].astro b/src/pages/app/[...appPath].astro index 9bee525..ca36aea 100644 --- a/src/pages/app/[...appPath].astro +++ b/src/pages/app/[...appPath].astro @@ -4,16 +4,19 @@ import axios from 'axios' +import { catchRedirectResponse } from '~/helpers/astro/request.js' import { ListingDetails } from '~/helpers/listing-page.js' import { getPathPartsFromAstroRequest } from '~/helpers/url.js' import Layout from '../../layouts/default.astro' import Listing from '../../components/default-listing.astro' -// const { -// appPath -// } = Astro.params +const redirectResponse = await catchRedirectResponse( Astro ) + +if ( redirectResponse !== null ) { + return redirectResponse +} // Get type and slug from the request path