frontend added and socket io

This commit is contained in:
2026-03-16 18:07:23 -05:00
parent 81dc575b4f
commit 5db2a7fe75
45 changed files with 11947 additions and 5546 deletions

View File

@@ -1,6 +1,5 @@
import { logs } from "backend/db/schema/logs.schema.js";
import { desc } from "drizzle-orm";
import { db } from "../db/db.controller.js";
import { logs } from "../db/schema/logs.schema.js";
import type { RoomId } from "./types.socket.js";
type RoomDefinition<T = unknown> = {
@@ -14,10 +13,10 @@ export const roomDefinition: Record<RoomId, RoomDefinition> = {
const rows = await db
.select()
.from(logs)
.orderBy(desc(logs.createdAt))
.orderBy(logs.createdAt)
.limit(limit);
return rows.reverse();
return rows; //.reverse();
} catch (e) {
console.error("Failed to seed logs:", e);
return [];
@@ -27,6 +26,7 @@ export const roomDefinition: Record<RoomId, RoomDefinition> = {
labels: {
seed: async (limit) => {
console.info(limit);
return [];
},
},