-
I have this logic here where all the lifting is done in the request handler and the request handler is largely boilerplate. Is this the right way to go about this? const faviconResultHandler = new ResultHandler({
positive: { statusCode: 301, mimeType: null, schema: z.never() },
negative: { statusCode: 404, mimeType: null, schema: z.never() },
handler: ({ response }) => {
response.redirect(
301,
FAVICON_URL
);
},
});
export const faviconHandler = attachBaseMiddleware(
new EndpointsFactory(faviconResultHandler)
).buildVoid({
handler: async () => {
},
}); |
Beta Was this translation helpful? Give feedback.
Answered by
RobinTail
Jul 30, 2025
Replies: 1 comment 1 reply
-
Hello @JoshElias , yeah, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
RobinTail
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @JoshElias ,
yeah,
.buildVoid()
is a shorthand for implementingEndpoint
having nooutput
schema.Technically, it does
return {};
for you under the hood.