logs: Added default limit that's cleared by adding a filter or clicking show more at the bottom.
the build was successful
the build was successful
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user