fix up report for use with login

This commit is contained in:
reality 2013-07-29 21:08:41 +00:00
parent 21b2b4eec3
commit 9a99d5eb47
5 changed files with 10 additions and 8 deletions

View File

@ -2,5 +2,7 @@
"ignorable": true, "ignorable": true,
"notifyVoice": false, "notifyVoice": false,
"dependencies": [ "users" ], "dependencies": [ "users" ],
"dbType": "redis" "dbType": "redis",
"requireWebLogin": true,
"webAccess": "power_users"
} }

View File

@ -2,14 +2,14 @@ var _ = require('underscore')._;
var pages = function(dbot) { var pages = function(dbot) {
return { return {
'/notify': function(req, res) { '/report': function(req, res) {
res.render('servers', { res.render('servers', {
'name': dbot.config.name, 'name': dbot.config.name,
'servers': _.keys(dbot.config.servers) 'servers': _.keys(dbot.config.servers)
}); });
}, },
'/notify/:server': function(req, res) { '/report/:server': function(req, res) {
var server = req.params.server; var server = req.params.server;
res.render('channels', { res.render('channels', {
'name': dbot.config.name, 'name': dbot.config.name,
@ -18,7 +18,7 @@ var pages = function(dbot) {
}); });
}, },
'/notify/:server/:channel': function(req, res) { '/report/:server/:channel': function(req, res) {
var server = req.params.server, var server = req.params.server,
channel = req.params.channel, channel = req.params.channel,
notifies = []; notifies = [];

View File

@ -3,8 +3,8 @@ extends ../layout
block content block content
h3 Channels on #{server} h3 Channels on #{server}
div#backlink div#backlink
a(href='/warning') « Server List a(href='/report') « Server List
ul#quotelist ul#quotelist
-each channel in channels -each channel in channels
a(href='/notify/'+server+'/'+encodeURIComponent(channel)) a(href='/report/'+server+'/'+encodeURIComponent(channel))
li.quotes #{channel} li.quotes #{channel}

View File

@ -2,7 +2,7 @@ extends ../layout
block content block content
div#backlink div#backlink
a(href='/notify/'+server) « Server Channels a(href='/report/'+server) « Server Channels
p p
div#profile_datatable div#profile_datatable
table.table.table-hover.data table.table.table-hover.data

View File

@ -6,5 +6,5 @@ block content
a(href='/') « Home a(href='/') « Home
ul#quotelist ul#quotelist
-each server in servers -each server in servers
a(href='/notify/'+server) a(href='/report/'+server)
li.quotes #{server} li.quotes #{server}