From 60da831cc17ec1861472887da72efd0e7514ca0f Mon Sep 17 00:00:00 2001 From: Sumit Kolhe <35036894+sumitkolhe@users.noreply.github.com> Date: Sun, 4 Aug 2024 13:56:45 +0530 Subject: [PATCH] build: fix ts errors --- .../artists/controllers/artist.controller.ts | 20 ++++++------ .../controllers/playlist.controller.ts | 8 ++--- .../search/controllers/search.controller.ts | 32 +++++++++---------- .../songs/controllers/song.controller.ts | 4 +-- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/modules/artists/controllers/artist.controller.ts b/src/modules/artists/controllers/artist.controller.ts index f994ee6..0c5f382 100644 --- a/src/modules/artists/controllers/artist.controller.ts +++ b/src/modules/artists/controllers/artist.controller.ts @@ -45,19 +45,19 @@ export class ArtistController implements Routes { title: 'Page number', description: 'page number', type: 'number', - example: 1 + example: '1' }), songCount: z.string().pipe(z.coerce.number()).optional().openapi({ title: 'Song count', description: 'Number of songs to fetch', type: 'number', - example: 10 + example: '10' }), albumCount: z.string().pipe(z.coerce.number()).optional().openapi({ title: 'Album count', description: 'Number of albums to fetch', type: 'number', - example: 10 + example: '10' }), sortBy: z.enum(['popularity', 'latest', 'alphabetical']).optional().openapi({ title: 'Sort by', @@ -135,19 +135,19 @@ export class ArtistController implements Routes { title: 'Page number', description: 'The page number of the results to retrieve', type: 'integer', - example: 0 + example: '0' }), songCount: z.string().pipe(z.coerce.number()).optional().openapi({ title: 'Song count', description: 'The number of songs to retrieve for the artist', type: 'integer', - example: 10 + example: '10' }), albumCount: z.string().pipe(z.coerce.number()).optional().openapi({ title: 'Album count', description: 'The number of albums to retrieve for the artist', type: 'integer', - example: 10 + example: '10' }), sortBy: z .enum(['popularity', 'latest', 'alphabetical']) @@ -230,8 +230,8 @@ export class ArtistController implements Routes { page: z.string().pipe(z.coerce.number()).optional().openapi({ description: 'The page number of the results to retrieve', type: 'number', - example: 0, - default: 0 + example: '0', + default: '0' }), sortBy: z .enum(['popularity', 'latest', 'alphabetical']) @@ -314,8 +314,8 @@ export class ArtistController implements Routes { page: z.string().pipe(z.coerce.number()).optional().openapi({ description: 'The page number of the results to retrieve', type: 'number', - example: 0, - default: 0 + example: '0', + default: '0' }), sortBy: z .enum(['popularity', 'latest', 'alphabetical']) diff --git a/src/modules/playlists/controllers/playlist.controller.ts b/src/modules/playlists/controllers/playlist.controller.ts index c838ca1..a5a4bf5 100644 --- a/src/modules/playlists/controllers/playlist.controller.ts +++ b/src/modules/playlists/controllers/playlist.controller.ts @@ -52,15 +52,15 @@ export class PlaylistController implements Routes { title: 'Page Number', description: 'The page number of the songs to retrieve from the playlist', type: 'integer', - example: 0, - default: 0 + example: '0', + default: '0' }), limit: z.string().pipe(z.coerce.number()).optional().openapi({ title: 'Limit', description: 'Number of songs to retrieve per page', type: 'integer', - example: 10, - default: 10 + example: '10', + default: '10' }) }) }, diff --git a/src/modules/search/controllers/search.controller.ts b/src/modules/search/controllers/search.controller.ts index 884d685..3331349 100644 --- a/src/modules/search/controllers/search.controller.ts +++ b/src/modules/search/controllers/search.controller.ts @@ -86,15 +86,15 @@ export class SearchController implements Routes { title: 'Page Number', description: 'The page number of the search results to retrieve', type: 'integer', - example: 0, - default: 0 + example: '0', + default: '0' }), limit: z.string().pipe(z.coerce.number()).optional().openapi({ title: 'Limit', description: 'Number of search results per page', type: 'integer', - example: 10, - default: 10 + example: '10', + default: '10' }) }) }, @@ -145,14 +145,14 @@ export class SearchController implements Routes { page: z.string().pipe(z.coerce.number()).optional().openapi({ description: 'The page number of the search results to retrieve', type: 'integer', - example: 0, - default: 0 + example: '0', + default: '0' }), limit: z.string().pipe(z.coerce.number()).optional().openapi({ description: 'The number of search results per page', type: 'integer', - example: 10, - default: 10 + example: '10', + default: '10' }) }) }, @@ -205,15 +205,15 @@ export class SearchController implements Routes { title: 'Page Number', description: 'The page number of the search results to retrieve', type: 'integer', - example: 0, - default: 0 + example: '0', + default: '0' }), limit: z.string().pipe(z.coerce.number()).optional().openapi({ title: 'Limit', description: 'Number of search results per page', type: 'integer', - example: 10, - default: 10 + example: '10', + default: '10' }) }) }, @@ -266,15 +266,15 @@ export class SearchController implements Routes { title: 'Page Number', description: 'The page number of the search results to retrieve', type: 'integer', - example: 0, - default: 0 + example: '0', + default: '0' }), limit: z.string().pipe(z.coerce.number()).optional().openapi({ title: 'Limit', description: 'Number of search results per page', type: 'integer', - example: 10, - default: 10 + example: '10', + default: '10' }) }) }, diff --git a/src/modules/songs/controllers/song.controller.ts b/src/modules/songs/controllers/song.controller.ts index 0e8938b..0ffba66 100644 --- a/src/modules/songs/controllers/song.controller.ts +++ b/src/modules/songs/controllers/song.controller.ts @@ -211,8 +211,8 @@ export class SongController implements Routes { description: 'Limit the number of suggestions to retrieve', type: 'number', title: 'Limit', - example: 10, - default: 10 + example: '10', + default: '10' }) }) },