This commit is contained in:
2024-01-14 14:17:17 +01:00
parent d44e75a83a
commit bd9edaa60e

View File

@@ -28,7 +28,7 @@ import { ArtistController } from "src/artist/artist.controller";
export class SearchController { export class SearchController {
constructor(private readonly searchService: SearchService) {} constructor(private readonly searchService: SearchService) {}
@Get("songs/:query") @Get("songs")
@ApiOkResponse({ type: _Song, isArray: true }) @ApiOkResponse({ type: _Song, isArray: true })
@ApiOperation({ description: "Search a song" }) @ApiOperation({ description: "Search a song" })
@ApiUnauthorizedResponse({ description: "Invalid token" }) @ApiUnauthorizedResponse({ description: "Invalid token" })
@@ -51,7 +51,7 @@ export class SearchController {
); );
} }
@Get("artists/:query") @Get("artists")
@UseGuards(JwtAuthGuard) @UseGuards(JwtAuthGuard)
@ApiOkResponse({ type: _Artist, isArray: true }) @ApiOkResponse({ type: _Artist, isArray: true })
@ApiUnauthorizedResponse({ description: "Invalid token" }) @ApiUnauthorizedResponse({ description: "Invalid token" })