Skip to content

Commit

Permalink
Drop the deprecated res.json( status, payload ) signature
Browse files Browse the repository at this point in the history
  • Loading branch information
mgol committed Nov 17, 2020
1 parent b8567af commit a295a83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Expand Up @@ -430,9 +430,9 @@ app.get( '/v1/bundle/:owner/:repo/:ref/:name?', function( req, res ) {
function onBundleBuildError( error ) {
// res.header( "Access-Control-Allow-Origin", "*");
if ( typeof error === "string" ) {
res.json( 500, { error: error });
res.status( 500 ).json( { error: error } );
} else {
res.json( 500, { error: error.message });
res.status( 500 ).json( { error: error.message } );
}
delete bundlePromises[ digest ];
}
Expand Down

0 comments on commit a295a83

Please sign in to comment.