No need to guess when we know we're sending JSON

parent c4a4f7f9
...@@ -27,7 +27,7 @@ app.get( '/', function( req, res ) { ...@@ -27,7 +27,7 @@ app.get( '/', function( req, res ) {
// Get some data // Get some data
app.get( '/api', function( req, res ) { app.get( '/api', function( req, res ) {
res.status( 400 ).send( { error: 'Must specify a domain!' } ); res.status( 400 ).json( { error: 'Must specify a domain!' } );
} ); } );
app.get( '/api/:domain', function( req, res ) { app.get( '/api/:domain', function( req, res ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment