fix : Création du compte courant

This commit is contained in:
2026-06-14 17:15:56 +02:00
parent 94dde0707e
commit b496f29a43
+1 -1
View File
@@ -45,7 +45,7 @@ router.post('/register', (req, res, next) => {
// Auto-créer un compte courant pour le profil principal // Auto-créer un compte courant pour le profil principal
db.prepare( db.prepare(
'INSERT INTO comptes (user_id, nom, type, investisseur_id) VALUES (?,?,?,?)' 'INSERT INTO comptes (user_id, nom, type, investisseur_id) VALUES (?,?,?,?)'
).run(userId, 'Compte courant', 'compte_courant', invResult.lastInsertRowid); ).run(userId, `Compte courant${fullName}`, 'compte_courant', invResult.lastInsertRowid);
const token = signToken({ sub: userId, email: body.email }); const token = signToken({ sub: userId, email: body.email });
res.status(201).json({ res.status(201).json({