Skip to content

Commit

Permalink
hotfix - Add mediasList to point/area
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur <arthurarp@hotmail.com>
  • Loading branch information
arthurarp committed Nov 4, 2021
1 parent ec69fd2 commit 46f053c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mapas/mapas.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ export class MapasService {

async getAreaWithMidia(id: string) {
const area = await this.getArea(id);

const areaDto = AreaDto.convertFromAreaDocument(area);
areaDto.medias = await this.getMediaList(area);

Expand Down Expand Up @@ -203,7 +202,7 @@ export class MapasService {
}

private async getMediaList(object: PointDocument | AreaDocument) {
return this.mediaRelationModel.find({ id: object.id });
return await this.mediaRelationModel.find({ locationId: object.id });
}

private async addMediaRelation(
Expand Down

0 comments on commit 46f053c

Please sign in to comment.