Add redirect URL when logging in, fix choices for characters not being saved

This commit is contained in:
Clément Pons
2026-01-05 17:34:42 +01:00
parent 04534b2530
commit 7021264c11
15 changed files with 50 additions and 49 deletions

View File

@@ -62,6 +62,9 @@ export default defineEventHandler(async (e) => {
const abilities = Object.entries(body.data.abilities).filter(e => e[1] !== undefined).map(e => ({ character: id, ability: e[0] as Ability, value: e[1], max: 0 }));
if(abilities.length > 0) tx.insert(characterAbilitiesTable).values(abilities).run();
const choices = Object.entries(body.data.choices).flatMap(e => e[1].map(_e => ({ character: id, id: e[0], choice: _e })));
if(choices.length > 0) tx.insert(characterChoicesTable).values(choices).run();
});
setResponseStatus(e, 200);