summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/main.cpp b/main.cpp
index ebe3554..1099960 100644
--- a/main.cpp
+++ b/main.cpp
@@ -13,18 +13,11 @@
void foo_handler(HTTP::Connection::p connection) {
std::cout << "Handling!" << std::endl;
- HTTPResponse res(connection->socket);
-
- //MusicListing::p ml = music::get(connection->path);
- bool ml = 0;
+ MusicListing::p ml = music::get(connection->path);
if(ml) {
- res.code = 200;
- res.status = "OK";
-
- //ml->render(connection, res);
+ ml->render(connection);
} else {
- res.code = 404;
- res.status = "Not Found";
+ connection->send_error(404, "Not Found");
}
}