Skip to content

Commit 9543ede

Browse files
committed
EndpointHandler: de-morgan logic for useRoutes
from !a or b -> a and b
1 parent 9a80747 commit 9543ede

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/middleware.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub fn EndpointHandler(comptime HandlerType: anytype, comptime ContextType: anyt
9999
pub fn onRequest(handler: *HandlerType, r: zap.Request, context: *ContextType) bool {
100100
const self: *Self = @fieldParentPtr("handler", handler);
101101
r.setUserContext(context);
102-
if (!self.options.checkPath or
102+
if (self.options.checkPath and
103103
std.mem.startsWith(u8, r.path orelse "", self.endpoint.settings.path))
104104
{
105105
self.endpoint.onRequest(r);

0 commit comments

Comments
 (0)