added color output in terminal

This commit is contained in:
wt committed 2024-05-30 15:43:37 +07:00
1 parent e7ca69aff1
commit ad94b4d194
11 files changed
+100 -1

No files matched your search

+2
View File
@@ -1,7 +1,9 @@
#include "users.hpp"
#include "../colors.h"
// function for get all users data without password
void get_all_users(const httplib::Request& request, httplib::Response& response) {
std::cout << GREEN << request.path << RESET << " " << request.method << std::endl;
response.set_header("Access-Control-Allow-Origin", "*");
if (request.body == "") {response.set_content("{\"required\":\"[token]\"}", "application/json");return;}
nlohmann::json json_body = nlohmann::json::parse(request.body);