@@ -43,14 +43,14 @@ const API_ROOT = 'https://api.relisten.net/api/v2';
4343registerFont ( __dirname + '/../../fonts/Roboto-Black.ttf' , { family : 'RobotoBlack' } ) ;
4444
4545router . get ( '/' , ( req , res ) => {
46- return res . json ( { hi : 'hi world' } ) ;
46+ res . json ( { hi : 'hi world' } ) ;
4747} ) ;
4848
4949router . get ( '/album-art/:artist/years/:year/:show_date/{:source}/:size.png' , ( req , res ) => {
5050 const size = parseInt ( req . params [ 'size' ] || '500' , 10 ) ; // Provide default or handle NaN
5151
5252 if ( isNaN ( size ) || ! ( size > 0 && size <= 1500 ) ) {
53- return res . status ( 400 ) . send ( 'Invalid size parameter' ) ;
53+ res . status ( 400 ) . send ( 'Invalid size parameter' ) ;
5454 }
5555
5656 const canvas : Canvas = createCanvas ( size , size ) ;
@@ -73,7 +73,7 @@ router.get('/album-art/:artist/years/:year/:show_date/{:source}/:size.png', (req
7373 . then ( ( json : ShowApiResponse ) => {
7474 if ( ! json || ! json . sources || json . sources . length === 0 ) {
7575 winston . error ( 'no json sources found (v2 api)' , { slug, year, date, sourceId } ) ;
76- return res . status ( 404 ) . send ( 'Show or sources not found' ) ;
76+ res . status ( 404 ) . send ( 'Show or sources not found' ) ;
7777 }
7878
7979 // Find source by ID if provided, otherwise use the first source
@@ -88,7 +88,7 @@ router.get('/album-art/:artist/years/:year/:show_date/{:source}/:size.png', (req
8888 date,
8989 sourceId,
9090 } ) ;
91- return res . status ( 404 ) . send ( 'Source not found or invalid' ) ;
91+ res . status ( 404 ) . send ( 'Source not found or invalid' ) ;
9292 }
9393
9494 let venue : Venue = {
@@ -130,7 +130,7 @@ router.get('/album-art/:artist/years/:year/:show_date/{:source}/:size.png', (req
130130 date,
131131 sourceId,
132132 } ) ;
133- return res . status ( 500 ) . send ( 'Error generating image buffer' ) ;
133+ res . status ( 500 ) . send ( 'Error generating image buffer' ) ;
134134 }
135135 res . send ( buf ) ;
136136 } ,
@@ -156,7 +156,7 @@ router.get('/ios-album-art/:artist/:source_uuid/:size.png', (req, res) => {
156156 const size = parseInt ( req . params [ 'size' ] || '500' , 10 ) ; // Provide default or handle NaN
157157
158158 if ( isNaN ( size ) || ! ( size > 0 && size <= 1500 ) ) {
159- return res . status ( 400 ) . send ( 'Invalid size parameter' ) ;
159+ res . status ( 400 ) . send ( 'Invalid size parameter' ) ;
160160 }
161161
162162 const canvas : Canvas = createCanvas ( size , size ) ;
@@ -177,7 +177,7 @@ router.get('/ios-album-art/:artist/:source_uuid/:size.png', (req, res) => {
177177 // V3 show endpoint returns a single show, sources are within it.
178178 if ( ! json || ! json . sources || json . sources . length === 0 ) {
179179 winston . error ( 'no json sources found (v3 api)' , { sourceUuid } ) ;
180- return res . status ( 404 ) . send ( 'Show or sources not found' ) ;
180+ res . status ( 404 ) . send ( 'Show or sources not found' ) ;
181181 }
182182
183183 // In v3 /shows/{uuid}, the response is the show containing the source.
@@ -191,7 +191,7 @@ router.get('/ios-album-art/:artist/:source_uuid/:size.png', (req, res) => {
191191 artistParam,
192192 sourceUuid,
193193 } ) ;
194- return res . status ( 404 ) . send ( 'Source not found or invalid' ) ;
194+ res . status ( 404 ) . send ( 'Source not found or invalid' ) ;
195195 }
196196
197197 let venue : Venue = {
@@ -228,7 +228,7 @@ router.get('/ios-album-art/:artist/:source_uuid/:size.png', (req, res) => {
228228 ( err , buf ) => {
229229 if ( err ) {
230230 winston . error ( 'Failed to create PNG buffer' , { error : err , artistParam, sourceUuid } ) ;
231- return res . status ( 500 ) . send ( 'Error generating image buffer' ) ;
231+ res . status ( 500 ) . send ( 'Error generating image buffer' ) ;
232232 }
233233 res . send ( buf ) ;
234234 } ,
0 commit comments