added editorconfig and formated code
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Has been cancelled

This commit is contained in:
wt committed 2025-02-13 19:35:42 +07:00
1 parent 77a483a38a
commit e5abe4bb02
23 files changed
+22332 -21478

No files matched your search

+3 -2
View File
@@ -6,7 +6,8 @@
#include <syslog.h>
// function for get all users data without password
void get_all_users(const httplib::Request &request, httplib::Response &response) {
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.empty()) {
@@ -36,7 +37,7 @@ void get_all_users(const httplib::Request &request, httplib::Response &response)
nlohmann::json all_users = nlohmann::json::parse(usersfile);
usersfile.close();
nlohmann::json response_user_data = nullptr;
for (nlohmann::json &user: all_users) {
for (nlohmann::json& user : all_users) {
if (user["id"] == userid) {
response_user_data = user;
}