Skip to content

update src/controllers/authController.ts #1

@WillIsback

Description

@WillIsback

Hello,

The password validation in src/utils/validation.ts defines that it must contain one uppercase letter, be alphanumeric, and be at least 8 characters long. Could you update the Swagger in src/controllers/authController.ts to match this validation?

 *               password:
 *                 type: string
 *                 minLength: 6
 *                 description: Mot de passe (minimum 6 caractères)
 *                 example: "password123"

Also, it appears that updatedAt is missing from the selection:

    // Créer le nouvel utilisateur
    const newUser = await prisma.user.create({
      data: {
        email: email.toLowerCase(),
        password: hashedPassword,
        name: name?.trim() || null,
      },
      select: {
        id: true,
        email: true,
        name: true,
        createdAt: true,
      },
    });

Thanks for the project, it's quite a fun one!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions