Browse Source

fix some error

dotos 9 years ago
parent
commit
070d6f1e74
3 changed files with 5 additions and 4 deletions
  1. 2 2
      app.js
  2. 1 1
      routes/v1.js
  3. 2 1
      routes/welcome.js

+ 2 - 2
app.js

@@ -105,7 +105,7 @@ if (app.get('env') === 'development') {
     app.use(function(err, req, res, next) {
         res.status(err.status || 500);
         res.send({
-            code: err.status,
+            status: err.status,
             message: err.message
         });
     });
@@ -116,7 +116,7 @@ if (app.get('env') === 'development') {
 app.use(function(err, req, res, next) {
     res.status(err.status || 500);
     res.send({
-        code: err.status,
+        status: err.status,
         message: err.message
     });
 });

+ 1 - 1
routes/v1.js

@@ -15,7 +15,7 @@ router.get('/', function(req, res, next) {
     if (originalUrl == /v1/) {
         ip2address(ip, function(data) {
             var output = {
-                code: 200,
+                status: 200,
                 IP: ip,
                 info: 'Please Set URL Like This: ' + protocol + '://' + host + '/v1/?url=http[s]://YourWantProxyUrl.com'
             };

+ 2 - 1
routes/welcome.js

@@ -9,7 +9,8 @@ router.get('/', function(req, res, next) {
     ip2addr(ip, function(data) {
         var params = {
             head: config.title,
-            title: 'Welcome | ' + config.title + ' - ' + config.description
+            title: 'Welcome | ' + config.title + ' - ' + config.description,
+            description: config.description
         };
         if (data) {
             params['address'] = '欢迎来自' + data.area + data.location + '的朋友';