diff --git a/src/node/db/API.js b/src/node/db/API.js index 68a57d7d0..4a1371ba5 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -154,6 +154,13 @@ Example returns: */ exports.setText = function(padID, text, callback) { + //text is required + if(typeof text != "string") + { + callback(new customError("text is no string","apierror")); + return; + } + //get the pad getPadSafe(padID, true, function(err, pad) { diff --git a/src/node/hooks/express.js b/src/node/hooks/express.js index c7897e772..1f4a6f2cc 100644 --- a/src/node/hooks/express.js +++ b/src/node/hooks/express.js @@ -3,6 +3,7 @@ var express = require('express'); var settings = require('../utils/Settings'); var fs = require('fs'); var path = require('path'); +var npm = require("npm/lib/npm.js"); var _ = require("underscore"); var server; diff --git a/src/static/tests.html b/src/static/tests.html index bd5bc578f..cbcd90af4 100644 --- a/src/static/tests.html +++ b/src/static/tests.html @@ -3,7 +3,7 @@ API Test and Examples Page - +