Skip to content

Commit

Permalink
zig- handler- add lowercase string type
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Sep 12, 2021
1 parent ea73fed commit 62cd5ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/handler/_.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const std = @import("std");
const string = []const u8;
const http = @import("apple_pie");
const files = @import("self/files");
const extras = @import("extras");
Expand Down Expand Up @@ -41,7 +42,7 @@ fn Middleware(comptime f: anytype) type {
};
}

fn file_route(comptime path: []const u8) http.router.Route {
fn file_route(comptime path: string) http.router.Route {
const T = struct {
fn f(_: void, response: *http.Response, request: http.Request) !void {
_ = request;
Expand All @@ -56,7 +57,7 @@ fn file_route(comptime path: []const u8) http.router.Route {
return http.router.get(path, T.f);
}

fn StaticPek(comptime path: []const u8) type {
fn StaticPek(comptime path: string) type {
return struct {
pub fn get(_: void, response: *http.Response, request: http.Request) !void {
try _internal.writePageResponse(request.arena, response, request, path, .{
Expand Down

0 comments on commit 62cd5ef

Please sign in to comment.