aboutsummaryrefslogtreecommitdiff
path: root/src/http/Route.zig
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-06-06 07:57:50 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2026-06-06 07:57:50 +0200
commit51307d973255e32ec1440083dee383e8b2cd8878 (patch)
treedac0309c7abd40d2a3822fca3f7df0fd485e04f0 /src/http/Route.zig
parent17561c6be1e4fba11e243f2ac842ebe26fae7e60 (diff)
Implement static handler and synchronous server handling
Diffstat (limited to 'src/http/Route.zig')
-rw-r--r--src/http/Route.zig4
1 files changed, 4 insertions, 0 deletions
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) },