From d1fba53891e0647dbd4e8da7249a31e5a5fe5193 Mon Sep 17 00:00:00 2001 From: Michal Skorczak Date: Wed, 13 Nov 2024 23:07:50 +0000 Subject: [PATCH] Removed: random std.info.log's --- src/main.zig | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main.zig b/src/main.zig index c51e75d..b3fc9af 100644 --- a/src/main.zig +++ b/src/main.zig @@ -10,8 +10,6 @@ pub fn init(allocator: std.mem.Allocator) Self { } pub fn index(self: *Self, req: zap.Request) void { - std.log.warn("index", .{}); - const string = std.fmt.allocPrint( self.allocator, "Test", @@ -22,8 +20,6 @@ pub fn index(self: *Self, req: zap.Request) void { } pub fn home(self: *Self, req: zap.Request) void { - std.log.warn("home", .{}); - const string = std.fmt.allocPrint( self.allocator, "HOME!!!", @@ -38,11 +34,8 @@ pub fn blog(self: *Self, req: zap.Request) void { std.log.err("parse error: {any}", .{err}); }; req.parseQuery(); - const param_count = req.getParamCount(); - std.log.info("param_count: {}", .{param_count}); // looking for /blog?post=post_name if(req.getParamSlice("post")) |value| { - std.log.info("post name: {s}", .{value}); // TODO: This will need to be updated to look at absolute // filepaths instead, it's a happy accident that this is safe now. const filepath = std.fmt.allocPrint(self.allocator, "./src/public/blog/{s}", .{value}) catch return; @@ -52,7 +45,6 @@ pub fn blog(self: *Self, req: zap.Request) void { // I believe that this is safe, since now the post_name now has to be // equal to one of the entries within the specified directory while (walker.next() catch return) |entry| { - std.log.info("entry: {s}", .{entry.path}); if(std.mem.eql(u8,entry.path,value)) { const file_content = std.fs.cwd().readFileAlloc(self.allocator, filepath, std.math.maxInt(usize)) catch return; defer self.allocator.free(file_content);