Skip to content
Snippets Groups Projects
Commit 94f23eef authored by Axel Huillard's avatar Axel Huillard
Browse files

modification pour ajouter supprimer l'id es champs du schema, ajout d'un...

modification pour ajouter supprimer l'id es champs du schema, ajout d'un booleen pour définir si le logement est archivé
parent 98da2a8b
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,6 @@ export class DatabaseController {
createPlaceDto.formatted_address = data.place.formatted_address;
createPlaceDto.geometry = data.place.geometry;
createPlaceDto.id = data.place.id;
createPlaceDto.name = data.place.name;
createPlaceDto.loue = data.place.loue;
......
import { IsInt, IsString, IsObject, } from 'class-validator';
import { IsInt, IsString, IsObject, IsBoolean} from 'class-validator';
export class CreatePlaceDto {
......@@ -8,9 +8,6 @@ export class CreatePlaceDto {
@IsObject()
geometry: any;
@IsString()
id: string;
@IsString()
name: string;
......@@ -26,4 +23,7 @@ export class CreatePlaceDto {
@IsString()
types: string[];
@IsBoolean()
archived: Boolean;
}
......@@ -11,9 +11,6 @@ export class Place {
@Prop({type: {location : {lat : Number, lng : Number}}})
geometry: any;
@Prop()
id: string;
@Prop()
name: string;
......@@ -31,6 +28,9 @@ export class Place {
@Prop()
types: string[];
@Prop()
archived: Boolean;
}
export const PlaceSchema = SchemaFactory.createForClass(Place);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment