mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-05-12 10:25:04 +00:00
- Implemented dashboard audit logging with InsertAuditLog, GetRecentAuditLogs, GetAuditLogsByIP, and CleanupOldAuditLogs methods. - Created dashboard configuration management with GetDashboardConfig and SetDashboardConfig methods. - Added new tables for dashboard_audit_log and dashboard_config in both MySQL and SQLite migrations. - Updated CMakeLists to include Crow and ASIO for dashboard server functionality. - Enhanced existing database classes to support new dashboard features, including character, play key, and property management. - Added new methods for retrieving and managing play keys, properties, and pet names. - Updated TestSQLDatabase to include stubs for new dashboard-related methods. - Modified shared and dashboard configuration files for new settings.
25 lines
665 B
C++
25 lines
665 B
C++
#pragma once
|
|
#include <crow.h>
|
|
#include <string>
|
|
|
|
namespace DashboardHelpers {
|
|
|
|
struct DataTablesParams {
|
|
int draw{0};
|
|
int start{0};
|
|
int length{10};
|
|
int orderColumn{-1};
|
|
std::string orderDir{"asc"};
|
|
};
|
|
|
|
// Parse common DataTables GET params from the request
|
|
DataTablesParams ParseDataTablesParams(const crow::request& req);
|
|
|
|
// Create a DataTables response object
|
|
crow::json::wvalue CreateDataTablesResponse(int draw, uint32_t recordsTotal, uint32_t recordsFiltered, const crow::json::wvalue::list& data);
|
|
|
|
// Rescue character stub (real logic may be project-specific)
|
|
bool RescueCharacter(const uint64_t characterId, const uint32_t zoneId);
|
|
|
|
}
|