Skip to content

Commit

Permalink
version 1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dgofman committed Sep 19, 2016
1 parent 4d81196 commit 30f9bd8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
12 changes: 0 additions & 12 deletions indigo.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,6 @@ var indigo =

this.static(this.getStaticDir(), webdir + '/static');

//http://localhost:8585/indigo/account/en/templates/login
app.use('/indigo/:routerPath/:locale/templates/:pageId', function(req, res) {
reqModel(null, req, res, function() {
locales.init(req, req.params.locale);

var url = '/' + req.session.locale + '/templates/' + req.params.routerPath + '/' + req.params.pageId + '.html',
newUrl = indigo.getNewURL(req, res, url);
debug('template: %s -> %s', url, newUrl);
res.sendFile(webdir + newUrl);
});
});

this.addRoute(appconf, locales, reqModel);

/**
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indigojs",
"version": "1.2.3",
"version": "1.2.4",
"description": "IndigoJS is an open source, JavaScript/NodeJS localization framework",
"main": "indigo.js",
"config": {
Expand Down Expand Up @@ -41,7 +41,7 @@
},
"devDependencies": {
"mocha": "~3.0.2",
"superagent": "~2.1.0",
"superagent": "~2.2.0",
"istanbul": "~0.4.4",
"jshint": "~2.9.2",
"less": "~2.7.1"
Expand Down
9 changes: 0 additions & 9 deletions test/mocha/routers.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ describe('Testing Account Routers', function () {
});
});

it('should test template Referer', function(done){
superagent.get('http://localhost:' + port + '/indigo/account/ru/templates/login')
.end(function(err, res) {
assert.equal(res.statusCode, 200);
assert.equal(res.headers['referer'], '/default/templates/account/login.html');
done();
});
});

it('should test router use on error', function(done){
superagent.get('http://localhost:' + port + '/account?ROUTER_ERROR=true')
.end(function(err, res) {
Expand Down

0 comments on commit 30f9bd8

Please sign in to comment.