Compare commits
4 Commits
5088e0bb2e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
423942d65e | ||
|
|
ff4d4cf892 | ||
|
|
68f8ca0ca5 | ||
|
|
6e254930b9 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -127,6 +127,11 @@ dist
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
.vscode/*
|
||||
|
||||
!.vscode/extensions.json
|
||||
!.vscode/settings.json
|
||||
|
||||
# yarn v2
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
|
||||
16
.vscode/extensions.json
vendored
Normal file
16
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
||||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
||||
|
||||
// List of extensions which should be recommended for users of this workspace.
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
"Vue.volar",
|
||||
"atommaterial.a-file-icon-vscode"
|
||||
],
|
||||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
||||
"unwantedRecommendations": [
|
||||
|
||||
]
|
||||
}
|
||||
14
.vscode/settings.json
vendored
Normal file
14
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"js/ts.tsdk.path": "node_modules/typescript/lib",
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
}
|
||||
1
package-lock.json
generated
1
package-lock.json
generated
@@ -14449,6 +14449,7 @@
|
||||
"version": "0.0.1",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@gim/shared": "*",
|
||||
"@nestjs/common": "^11.0.1",
|
||||
"@nestjs/config": "^4.0.3",
|
||||
"@nestjs/core": "^11.0.1",
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"test:e2e": "jest --config ./test/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@gim/shared": "*",
|
||||
"@nestjs/common": "^11.0.1",
|
||||
"@nestjs/config": "^4.0.3",
|
||||
"@nestjs/core": "^11.0.1",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { IsEmail, IsNotEmpty, MinLength } from 'class-validator';
|
||||
import { ICreateUserDTO } from '@gim/shared';
|
||||
|
||||
export class CreateUserDto {
|
||||
export class CreateUserDto implements ICreateUserDTO {
|
||||
@IsEmail({}, { message: "L'email doit être valide" })
|
||||
email!: string;
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { IUser } from '@gim/shared';
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
@@ -6,7 +7,7 @@ import {
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity('utilisateurs')
|
||||
export class User {
|
||||
export class User implements IUser {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"name": "@gim/shared",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js"
|
||||
}
|
||||
"private": true,
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts"
|
||||
}
|
||||
1
packages/shared/src/index.ts
Normal file
1
packages/shared/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './users/user.interface';
|
||||
20
packages/shared/src/users/user.interface.ts
Normal file
20
packages/shared/src/users/user.interface.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Contrat pour les données envoyées lors de l'inscription
|
||||
*/
|
||||
export interface ICreateUserDTO {
|
||||
email: string;
|
||||
motDePasse: string;
|
||||
nom: string;
|
||||
prenom: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contrat pour les données renvoyées par l'API (profil public)
|
||||
*/
|
||||
export interface IUser {
|
||||
id: string;
|
||||
email: string;
|
||||
nom: string;
|
||||
prenom: string;
|
||||
dateCreation: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user