mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 15:14:08 +00:00
Revert "EndpointHandler: de-morgan logic for useRoutes"
This reverts commit 9543ede15f
.
This commit is contained in:
parent
dfdb2db4ce
commit
ae5c927833
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ pub fn EndpointHandler(comptime HandlerType: anytype, comptime ContextType: anyt
|
||||||
pub fn onRequest(handler: *HandlerType, r: zap.Request, context: *ContextType) bool {
|
pub fn onRequest(handler: *HandlerType, r: zap.Request, context: *ContextType) bool {
|
||||||
const self: *Self = @fieldParentPtr("handler", handler);
|
const self: *Self = @fieldParentPtr("handler", handler);
|
||||||
r.setUserContext(context);
|
r.setUserContext(context);
|
||||||
if (self.options.checkPath and
|
if (!self.options.checkPath or
|
||||||
std.mem.startsWith(u8, r.path orelse "", self.endpoint.settings.path))
|
std.mem.startsWith(u8, r.path orelse "", self.endpoint.settings.path))
|
||||||
{
|
{
|
||||||
self.endpoint.onRequest(r);
|
self.endpoint.onRequest(r);
|
||||||
|
|
Loading…
Add table
Reference in a new issue