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:
parent
f67e4b9b04
commit
9edb38fedc
1 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue