Fix logs and character admin

This commit is contained in:
2026-01-23 07:41:40 +07:00 Unverified
parent 805175682f
commit 41093f8985
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -3,6 +3,9 @@ import { characters } from "@/lib/db/schema";
import { CharManager } from "./client";
export default async function CharManagerPage() {
const chars = await db.select().from(characters);
const chars = await db
.select()
.from(characters)
.orderBy(characters.amber, characters.id);
return <CharManager chars={chars} />;
}
+1 -1
View File
@@ -24,7 +24,7 @@ export default function AuditLogViewer({
useEffect(() => {
const es = new EventSource("/api/ev/log");
es.onmessage = (res) =>
updateLogs((x) => [...x.slice(0, 999), JSON.parse(res.data)]);
updateLogs((x) => [...x.slice(-999), JSON.parse(res.data)]);
return () => es.close();
}, []);