This commit is contained in:
Aaron Kimbrell
2026-02-24 20:35:09 -06:00
parent f1847d1f20
commit 910b92ffc7
24 changed files with 883 additions and 180 deletions

View File

@@ -5,6 +5,7 @@
#include <memory>
#include <algorithm>
#include "eHTTPStatusCode.h"
#include "json.hpp"
/**
* HTTP Request Context
@@ -56,4 +57,14 @@ struct HTTPContext {
std::transform(lowerName.begin(), lowerName.end(), lowerName.begin(), ::tolower);
headers[lowerName] = value;
}
/**
* Get user data as JSON for template rendering
*/
nlohmann::json GetUserDataJson() const {
nlohmann::json userData;
userData["username"] = authenticatedUser;
userData["gmLevel"] = gmLevel;
return userData;
}
};