Skip to content

Commit 5b4efc9

Browse files
committed
refactor: clean up imports and add category filter to public song retrieval in SongService
1 parent 42451c4 commit 5b4efc9

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

apps/backend/src/song/song.service.ts

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
11
import { BROWSER_SONGS } from '@nbw/config';
2-
import { FeaturedSongsDto, TimespanType, UserDocument ,
3-
PageQueryDTO,
4-
Song as SongEntity,
5-
SongPageDto,
6-
SongPreviewDto,
7-
SongViewDto,
8-
SongWithUser,
9-
UploadSongDto,
10-
UploadSongResponseDto,
11-
} from '@nbw/database';
12-
import {
13-
HttpException,
14-
HttpStatus,
15-
Inject,
16-
Injectable,
17-
Logger,
18-
} from '@nestjs/common';
2+
import { FeaturedSongsDto, TimespanType, UserDocument , PageQueryDTO, Song as SongEntity, SongPageDto, SongPreviewDto, SongViewDto, SongWithUser, UploadSongDto, UploadSongResponseDto,} from '@nbw/database';
3+
import { HttpException, HttpStatus, Inject, Injectable, Logger,} from '@nestjs/common';
194
import { InjectModel } from '@nestjs/mongoose';
205
import { Model } from 'mongoose';
216

227
import { FileService } from '@server/file/file.service';
238

24-
259
import { SongUploadService } from './song-upload/song-upload.service';
2610
import { SongWebhookService } from './song-webhook/song-webhook.service';
2711
import { removeExtraSpaces } from './song.util';
@@ -499,6 +483,7 @@ export class SongService {
499483
{
500484
$match: {
501485
visibility: 'public',
486+
category : category,
502487
},
503488
},
504489
{

0 commit comments

Comments
 (0)