some optimization
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
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:
1 parent
aeefe1ea7f
commit
ed7921155d
4 files changed
+7
-7
No files matched your search
@@ -59,7 +59,7 @@ void change_password(const httplib::Request& request, httplib::Response& respons
|
||||
return;
|
||||
}
|
||||
|
||||
std::ifstream usersfile("users.json");
|
||||
std::ifstream usersfile(USERS_FILE);
|
||||
nlohmann::json all_users = nlohmann::json::parse(usersfile);
|
||||
usersfile.close();
|
||||
|
||||
@@ -114,7 +114,7 @@ void change_password(const httplib::Request& request, httplib::Response& respons
|
||||
syslog(LOG_ERR, "can't find this user in change password request");
|
||||
return;
|
||||
}
|
||||
std::ofstream usersfilew("users.json");
|
||||
std::ofstream usersfilew(USERS_FILE);
|
||||
usersfilew << all_users.dump(4);
|
||||
usersfilew.close();
|
||||
response.set_content(R"({"status":"ok"})", JSON_TYPE);
|
||||
|
||||
Reference in new issue
Block a user