-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrading turtle.io to 4.0.0, initial changes to support it (WIP)
- Loading branch information
Showing
6 changed files
with
227 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,13 @@ | |
* | ||
* @author Jason Mulligan <[email protected]> | ||
* @copyright 2015 Jason Mulligan | ||
* @license BSD-3 <https://raw.github.com/avoidwork/tenso/master/LICENSE> | ||
* @license BSD-3-Clause | ||
* @link http://avoidwork.github.io/tenso | ||
* @module tenso | ||
* @version 1.4.10 | ||
* @version 1.5.0 | ||
*/ | ||
const CONFIG = require( __dirname + "/../config.json" ); | ||
const VERSION = "1.4.10"; | ||
const VERSION = "1.5.0"; | ||
const SERVER = "tenso/" + VERSION; | ||
|
||
let keigai = require( "keigai" ), | ||
|
@@ -788,9 +788,10 @@ let bootstrap = ( obj, config ) => { | |
|
||
// Starting API server | ||
obj.server.start( config, ( req, res, status, msg ) => { | ||
var err = msg instanceof Error ? msg : new Error( msg || obj.messages[ status ] ); | ||
var stat = status instanceof Error ? parseInt ( status.message, 10 ) : status, | ||
err = msg instanceof Error ? msg : new Error( msg || obj.messages[ stat ] ); | ||
|
||
error( obj, req, res, status, err, obj ); | ||
error( obj, req, res, stat, err, obj ); | ||
} ); | ||
|
||
if ( notify ) { | ||
|
@@ -1144,7 +1145,7 @@ let renderers = { | |
} ).join( "\n" ) ) | ||
.replace( "{{body}}", JSON.stringify( arg, null, 2 ) ) | ||
.replace( "{{year}}", new Date().getFullYear() ) | ||
.replace( "{{version}}", "1.4.10" ) | ||
.replace( "{{version}}", "1.5.0" ) | ||
.replace( "{{allow}}", headers[ "allow" ] ) | ||
.replace( "{{methods}}", string.explode( headers[ "allow" ].replace( "GET, HEAD, OPTIONS", "" ) ).filter( function ( i ) { | ||
return i !== ""; | ||
|
Oops, something went wrong.