Skip to content

Commit

Permalink
Revert "search"
Browse files Browse the repository at this point in the history
This reverts commit db069db.
  • Loading branch information
abdelillah committed May 27, 2022
1 parent db069db commit 3cca756
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 0 additions & 2 deletions src/playlists/playlists.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export class PlaylistsService {
const playlist = new this.playlistModel(createPlaylist);

const savedPlaylist = await playlist.save();
this.playlistsSearchService.insertIndex(savedPlaylist);
return savedPlaylist;
}

Expand Down Expand Up @@ -153,7 +152,6 @@ export class PlaylistsService {
throw new Error("Can't delete playlist");
}

this.playlistsSearchService.deleteIndex(id);
return {
id: playlist._id.toString(),
title: playlist.title,
Expand Down
18 changes: 9 additions & 9 deletions src/tracks/tracks.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ export class TracksService {
},
},
},
{
$project: { id: '$_id', username: '$username', email: '$email' },
}
],
as: 'author',
},
Expand All @@ -233,9 +230,6 @@ export class TracksService {
$expr: ['$$track_id', '$tracks'],
},
},
{
$project: { id: '$_id', title: '$title' },
},
],
as: 'release',
},
Expand All @@ -244,14 +238,20 @@ export class TracksService {
$project: {
id: '$_id',
title: 1,
fileName: 1,
feats: {
id: '$_id',
username: 1,
email: 1,
},
release: { $arrayElemAt: ['$release', 0] },
author: { $arrayElemAt: ['$author', 0] },
release: {
id: '$_id',
title: 1,
},
author: {
id: '$_id',
username: 1,
email: 1,
},
},
},
]);
Expand Down

0 comments on commit 3cca756

Please sign in to comment.