Fix logs and character admin
This commit is contained in:
@@ -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} />;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user