Skip to content

Commit

Permalink
fix(logements): ajout typeBien transformEntry
Browse files Browse the repository at this point in the history
Ajouter le type de bien dans la méthode de transformation vers Meilisearch
  • Loading branch information
SEFR authored and Sefrancois committed Jan 19, 2023
1 parent 22f1a9e commit 29ac7e0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,8 @@ exports
dist
build
.strapi-updater.json

############################
# Local
############################
tmp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ describe("AnnonceDeLogementTransformation", () => {
surfaceMax: 30,
surfaceAAfficher: `de 25 à 30 m²`,
type: "courte",
typeBien: "t1bis",
url: "http://some.url",
imagesUrl: ["http://some.url/1", "http://some.url/2"],
sourceUpdatedAt: "2022-12-12T01:30:00.000Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function transformerAnnonceDeLogement({ entry }: { entry: AnnonceDeLogeme
surfaceMax: surfaceMax ? surfaceMax : 0,
surfaceAAfficher: getSurfaceToDisplay(surface, surfaceMax),
type: entry.type,
typeBien: entry.typeBien,
url: entry.url,
imagesUrl: entry.imagesUrl?.map(imageUrl => imageUrl.value) || [],
sourceUpdatedAt: entry.sourceUpdatedAt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface AnnonceDeLogementMeilisearch {
surfaceMax: number;
surfaceAAfficher: string;
type: string; // enum
typeBien: string; // enum
url: string;
imagesUrl: Array<string>;
sourceUpdatedAt: string;
Expand Down

0 comments on commit 29ac7e0

Please sign in to comment.