Skip to content

Commit

Permalink
better path mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Sep 9, 2023
1 parent af1660f commit b26987d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/v2/repository/firestorm/path.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class PathFirestormRepository implements PathRepository {
}

getPathById(path_id: string): Promise<Path> {
return paths.get(path_id).then((p) => mapPath(p));
return paths.get(path_id).then(mapPath);
}

updatePath(path_id: string, path: Path): Promise<Path> {
Expand Down
2 changes: 1 addition & 1 deletion src/v2/service/path.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class PathService {
getRaw(): Promise<Paths> {
return this.repository
.getRaw()
.then((res: any) => Object.values(res).map((i: any) => mapPath(i)));
.then((res: any) => Object.values(res).map(mapPath));
}

getPathByUseId(use_id: string): Promise<Paths> {
Expand Down

0 comments on commit b26987d

Please sign in to comment.