logs: Added default limit that's cleared by adding a filter or clicking show more at the bottom.
the build was successful

This commit is contained in:
2019-01-12 15:35:21 +01:00
parent 46369f84bd
commit 8b3d642104
4 changed files with 43 additions and 3 deletions
+8 -1
View File
@@ -8,19 +8,26 @@ const {channelApi} = require("../../rpdata/api/Channel")
const listTemplate = require("../../marko/page/logs/list.marko")
router.get("/", async(req, res) => {
const filter = {limit: 0}
const filter = {limit: 75}
if (req.query.characters) {
filter.characters = req.query.characters.split(",")
filter.limit = 0
}
if (req.query.channels) {
filter.channels = req.query.channels.split(",")
filter.limit = 0
}
if (req.query.events) {
filter.events = req.query.events.split(",")
filter.limit = 0
}
if (req.query.search) {
filter.search = req.query.search
filter.limit = 0
}
if (req.query.limit) {
filter.limit = parseInt(req.query.limit)
}
try {