fix : Création du compte courant
This commit is contained in:
@@ -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({
|
||||||
|
|||||||
Reference in New Issue
Block a user