mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Use Response Defaults on templates
This commit is contained in:
parent
38ff3bb510
commit
b665e100af
8 changed files with 47 additions and 8 deletions
|
|
@ -1,6 +1,9 @@
|
|||
---
|
||||
// import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
|
||||
import { catchRedirectResponse } from '~/helpers/astro/request.js'
|
||||
import {
|
||||
catchRedirectResponse,
|
||||
applyResponseDefaults
|
||||
} from '~/helpers/astro/request.js'
|
||||
|
||||
import Layout from '../layouts/default.astro'
|
||||
import LinkButton from '~/components/link-button.vue'
|
||||
|
|
@ -19,6 +22,8 @@ if ( redirectResponse !== null ) {
|
|||
return redirectResponse
|
||||
}
|
||||
|
||||
applyResponseDefaults( Astro )
|
||||
|
||||
// https://docs.astro.build/en/reference/api-reference/#astroresponse
|
||||
Astro.response.status = 404
|
||||
Astro.response.statusText = 'Not found'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue