Skip to content

Commit

Permalink
fix search by return type
Browse files Browse the repository at this point in the history
  • Loading branch information
ciminf committed Jul 13, 2022
1 parent 21d6666 commit 1075ba5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/service/neo4j.node.model.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ export abstract class Neo4jNodeModelService<T> extends Neo4jModelService<T> {
runTx: (tx?: Transaction) => tx.run(query.cypher, query.parameters),
run: async () => {
const res = await this._run(query);
return res.map((r) => {
return [this.fromNeo4j(r.matched), r.score.toNumber()];
});
return res.map(
(r) => <[T, number]>[this.fromNeo4j(r.matched), r.score.toNumber()],
);
},
};
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nhogs/nestjs-neo4j",
"version": "0.5.1",
"version": "0.5.2",
"engines": {
"node": ">=16.x"
},
Expand Down

0 comments on commit 1075ba5

Please sign in to comment.