feat(backend): endpoint inscription parent + nettoyage code #9
🧹 NETTOYAGE CODE ÉTUDIANT: - Suppression console.log/error (4 occurrences) - Suppression code commenté inutile - Suppression champs obsolètes (mobile, telephone_fixe) - Correction password nullable dans Users entity ✨ NOUVELLES FONCTIONNALITÉS: - Ajout champs token_creation_mdp dans Users entity - Création RegisterParentDto (validation complète) - Endpoint POST /auth/register/parent - Méthode registerParent() avec transaction - Gestion Parent 1 + Parent 2 (co-parent optionnel) - Génération tokens UUID pour création MDP - Lecture durée token depuis AppConfigService - Création automatique entités Parents - Statut EN_ATTENTE par défaut - Intégration AppConfigModule dans AuthModule - Amélioration méthode login() (vérif statut + password null) 📋 WORKFLOW CDC CONFORME: - Inscription SANS mot de passe - Token envoyé par email (TODO) - Validation gestionnaire requise - Support co-parent avec même adresse Réf: docs/20_WORKFLOW-CREATION-COMPTE.md Ticket: #9 (ou #16)
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
import { forwardRef, Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { AuthController } from './auth.controller';
|
||||
import { AuthService } from './auth.service';
|
||||
import { UserModule } from '../user/user.module';
|
||||
import { JwtModule } from '@nestjs/jwt';
|
||||
import { ConfigModule, ConfigService } from '@nestjs/config';
|
||||
import { Users } from 'src/entities/users.entity';
|
||||
import { Parents } from 'src/entities/parents.entity';
|
||||
import { AppConfigModule } from 'src/modules/config';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
TypeOrmModule.forFeature([Users, Parents]),
|
||||
forwardRef(() => UserModule),
|
||||
AppConfigModule,
|
||||
JwtModule.registerAsync({
|
||||
imports: [ConfigModule],
|
||||
useFactory: (config: ConfigService) => ({
|
||||
|
||||
Reference in New Issue
Block a user