WebSocket API, new ID/encrypt/decrypt algorithm.

This commit is contained in:
Clément Pons
2025-11-18 17:54:11 +01:00
parent 2a158be3fa
commit 7a40f8abac
26 changed files with 2303 additions and 293 deletions

View File

@@ -24,7 +24,7 @@ export default defineEventHandler(async (e) => {
members: { with: { member: { columns: { username: true, id: true } } }, columns: { id: false, user: false } },
characters: { with: { character: { columns: { id: true, name: true, owner: true } } }, columns: { character: false } },
owner: { columns: { username: true, id: true } },
logs: { columns: { details: true, from: true, timestamp: true, type: true }, orderBy: ({ timestamp }) => timestamp },
logs: { columns: { details: true, target: true, timestamp: true, type: true }, orderBy: ({ timestamp }) => timestamp },
},
where: ({ id: _id }) => eq(_id, parseInt(id, 10)),
}).sync();

View File

@@ -39,7 +39,9 @@ export default defineEventHandler(async (e) => {
db.transaction((tx) => {
tx.update(campaignTable).set({
name: body.data.name,
description: body.data.description,
public_notes: body.data.public_notes,
dm_notes: body.data.dm_notes,
settings: body.data.settings,
}).where(eq(campaignTable.id, id)).run();
});
}