Fix dynamic character sheet loading.

This commit is contained in:
Clément Pons
2026-03-09 17:27:18 +01:00
parent 974989abd3
commit 3bafc14255
10 changed files with 329 additions and 14505 deletions

View File

@@ -14,7 +14,7 @@ export default defineEventHandler(async (e) => {
try
{
const id = getRouterParam(e, "id") ?? '';
const body = await readRawBody(e);
const body = Buffer.from(await readRawBody(e) ?? '');
if(!id)
{
@@ -32,7 +32,7 @@ export default defineEventHandler(async (e) => {
}
db.insert(projectContentTable).values({ id: id, content: body }).onConflictDoUpdate({ set: { content: body }, target: projectContentTable.id }).run();
db.update(projectFilesTable).set({ timestamp: new Date() }).where(eq(projectFilesTable.id, id)).run()
db.update(projectFilesTable).set({ timestamp: new Date() }).where(eq(projectFilesTable.id, id)).run();
}
catch(_e)
{