Skip to content

Commit

Permalink
pupulate fp when getting
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagahbond committed Jul 5, 2022
1 parent 3fa7a93 commit d5207b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fp-searches/fp-searches.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ export class FpSearchesService {
async findSearchById(id: string): Promise<FpSearchDocument> {
this.logger.log(`Finding search by id "${id}"`);
isValidId(id);
const search = await this.fpSearchModel.findById(id);
const search = await this.fpSearchModel
.findById(id)
.populate('foundTrack')
.populate('author');

if (!search) {
throw new NotFoundException(`Search with ID "${id}" not found.`);
Expand Down

0 comments on commit d5207b6

Please sign in to comment.