From 51307d973255e32ec1440083dee383e8b2cd8878 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Sat, 6 Jun 2026 07:57:50 +0200 Subject: Implement static handler and synchronous server handling --- src/http/Route.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/http/Route.zig') diff --git a/src/http/Route.zig b/src/http/Route.zig index f979d04..7dd8ec0 100644 --- a/src/http/Route.zig +++ b/src/http/Route.zig @@ -19,6 +19,10 @@ pub const index: @This() = .{ .segments = &.{} }; pub fn fromAny(comptime route: anytype) @This() { var segments: []const Segment = &.{}; + if (route == .index) { + return index; + } + inline for (route) |r| { const segment: []const Segment = &.{switch (@TypeOf(r)) { @EnumLiteral() => .{ .identifier = @tagName(r) }, -- cgit v1.2.3-70-g09d2