From 16688ac6799d49c07f385b9c9dc67bac91df371c Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Mon, 30 Jun 2025 12:07:00 -0500 Subject: [PATCH] updates --- .gitignore | 1 + main.cpp | 4 ++-- router.hpp | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b15dd75..4209959 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Build directories build/ +.cache # Executables *.out diff --git a/main.cpp b/main.cpp index 5c6fd35..e551e8f 100644 --- a/main.cpp +++ b/main.cpp @@ -42,8 +42,8 @@ int main() { }); router.post("/users", [](const Request& req, Response& res) { - std::string body_preview = std::string(req.body.substr(0, 100)); - res.set_json("{\"message\":\"User created\",\"received\":\"" + body_preview + "\"}"); + const auto body_preview = std::string(req.body.substr(0, 100)); + res.set_json(R"({"message":"User created","received":")" + body_preview + "\"}"); res.status = 201; }); diff --git a/router.hpp b/router.hpp index 795248a..02bd72f 100644 --- a/router.hpp +++ b/router.hpp @@ -5,7 +5,6 @@ #include "request.hpp" #include #include -#include #include #include #include