dota2-radiant
Version:
Radiant: a small little library/framework for building awesome apps backed by the Dota 2 WebAPI. Utilizes Node with Express
19 lines (15 loc) • 485 B
JavaScript
var radiant = require('../dota2-radiant');
var app = radiant.app;
var HeroesController = {
'index': function (req, res) {
radiant.dazzle.getHeroes(function (err, result) {
result.heroes.forEach(function (hero) {
hero.clean_name = hero.name.replace('npc_dota_hero_', '');
});
res.render('heroes', {
heroes: result.heroes
});
});
}
};
module.exports = exports = HeroesController;