From ca81732661cc50f67ae34373aa5364b973167ac8 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Wed, 17 Jul 2013 16:09:01 -0400 Subject: [PATCH] show correct version on admin/index --- public/templates/admin/index.tpl | 2 +- src/routes/admin.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/templates/admin/index.tpl b/public/templates/admin/index.tpl index af5b04ba12..507cea020e 100644 --- a/public/templates/admin/index.tpl +++ b/public/templates/admin/index.tpl @@ -8,7 +8,7 @@ Get Themes dcplabs

-

You are running NodeBB v0.0.1. This is where we will check to make sure your NodeBB is latest, etc.

+

You are running NodeBB v{version}. This is where we will check to make sure your NodeBB is latest, etc.

diff --git a/src/routes/admin.js b/src/routes/admin.js index f2c00f6a48..38be4c3094 100644 --- a/src/routes/admin.js +++ b/src/routes/admin.js @@ -1,7 +1,8 @@ var user = require('./../user.js'), topics = require('./../topics.js'), - RDB = require('./../redis.js') + RDB = require('./../redis.js'), + pkg = require('./../../package.json'), categories = require('./../categories.js'); (function(Admin) { @@ -57,6 +58,9 @@ var user = require('./../user.js'), function api_method(req, res) { switch(req.params.method) { + case 'index': + res.json({version:pkg.version}); + break; case 'users' : if (req.params.tab == 'search') { res.json({search_display: 'block', users: []});