[Solved] How to use createQueryBuilder with Params inside postman?

Gauthier Cornec Asks: How to use createQueryBuilder with Params inside postman?
I would like to user QueryBuilder to search by my own input inside postman to get response from my database.

This is my service.ts

Code:
findByType(genre, artistId){
    console.log("test")
    const query = this.nftRepository.createQueryBuilder("nft");
    query.select("nft")
         .where("nft.genre = :genre OR nft.artistId = :artistId", {genre: "", artistId: ""})
         .setParameters({artistId, genre})
    console.log("console.log", query.getSql())
  // query.getOne()

    return query.getRawMany()
}

This is my controller.ts

Code:
@Get('search')
  @ApiOperation({summary: 'Get nft bby type'})
  findType() {
    console.log("test")
    return this.nftsService.findByType("", "")
    }

I would like to go to localhost:3000/search:2&xx and get a result for id 2 and genre xx

Thanks for helping :)

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.