updated for classes and small fix web
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
a19e44188a
commit
40ccbd6ad2
13 files changed
+50
-43
No files matched your search
@@ -10,7 +10,7 @@ namespace AuthService
|
||||
namespace Users
|
||||
{
|
||||
// function for change user data
|
||||
void change_user(const httplib::Request& request, httplib::Response& response)
|
||||
void Users::change_user(const httplib::Request& request, httplib::Response& response)
|
||||
{
|
||||
std::cout << GREEN << request.path << RESET << " " << request.method << std::endl;
|
||||
response.set_header("Access-Control-Allow-Origin", "*");
|
||||
@@ -19,7 +19,7 @@ namespace AuthService
|
||||
AuthService::Includes::check_body_data(json_body, "token", response, CHANGE_USER_REQUIRED_STRING);
|
||||
AuthService::Includes::check_body_data(json_body, "userid", response, CHANGE_USER_REQUIRED_STRING);
|
||||
AuthService::Includes::check_body_data(json_body, "old_password", response, CHANGE_USER_REQUIRED_STRING);
|
||||
AuthService::Auth::verify_auth(json_body["token"], response);
|
||||
AuthService::Auth::Auth::verify_auth(json_body["token"], response);
|
||||
|
||||
std::string userid = JWT::get_payload(json_body["token"], JWT_SECRET_KEY)["userId"];
|
||||
if (userid.empty()) {
|
||||
|
||||
Reference in new issue
Block a user