feat: implement administrative control panel with real-time bot actions
This commit is contained in:
@@ -121,7 +121,7 @@ export const dashboardService = {
|
||||
|
||||
// Combine and sort by timestamp
|
||||
const allEvents = [...txEvents, ...modEvents]
|
||||
.sort((a, b) => b.timestamp.getTime() - a.timestamp.getTime())
|
||||
.sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime())
|
||||
.slice(0, limit);
|
||||
|
||||
return allEvents;
|
||||
@@ -141,7 +141,7 @@ export const dashboardService = {
|
||||
const { systemEvents, EVENTS } = await import("@shared/lib/events");
|
||||
systemEvents.emit(EVENTS.DASHBOARD.NEW_EVENT, {
|
||||
...fullEvent,
|
||||
timestamp: fullEvent.timestamp.toISOString()
|
||||
timestamp: (fullEvent.timestamp as Date).toISOString()
|
||||
});
|
||||
} catch (e) {
|
||||
console.error("Failed to emit system event:", e);
|
||||
|
||||
Reference in New Issue
Block a user