aboutsummaryrefslogtreecommitdiff
path: root/src/http/Route.zig
diff options
context:
space:
mode:
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) },