1
Fork 0
mirror of https://github.com/diced/zipline.git synced 2025-04-11 23:31:17 -05:00

fix: a sort of 404 for when dev'ing cuz next didn't care to compile the og 404

This commit is contained in:
Jayvin Hernandez 2025-02-06 17:49:30 -08:00
parent f67e4b9b04
commit 9edb38fedc
No known key found for this signature in database
GPG key ID: 97C2E533F17AF0EB

View file

@ -6,11 +6,9 @@ function notFound(fastify: FastifyInstance, _: unknown, done: () => void) {
done();
function notFound(this: FastifyReply) {
if (this.server.config.features.headless) {
return this.callNotFound();
} else {
return this.server.nextServer.render404(this.request.raw, this.raw);
}
if (process.env.NODE_ENV == 'development') return this.code(404).send('not found :(');
if (this.server.config.features.headless) return this.callNotFound();
return this.server.nextServer.render404(this.request.raw, this.raw);
}
}