diff --git a/src/client/api/index.js b/src/client/api/index.js index 571088e0a..c18860766 100644 --- a/src/client/api/index.js +++ b/src/client/api/index.js @@ -29,7 +29,7 @@ api.dashboard.getData = payload => { } api.dashboard.getTopGroups = payload => { const timespan = payload.timespan || 30 - return axios.get(`/api/v1/tickets/count/topgroups/${timespan}`).then(res => { + return axios.get(`/api/v1/tickets/count/topgroups/${timespan}/5`).then(res => { return res.data }) } diff --git a/src/controllers/api/v1/tickets.js b/src/controllers/api/v1/tickets.js index 0d57026e2..ae0fa8cf7 100644 --- a/src/controllers/api/v1/tickets.js +++ b/src/controllers/api/v1/tickets.js @@ -1703,17 +1703,17 @@ apiTickets.getTicketStatsForUser = function (req, res) { * */ apiTickets.getTagCount = function (req, res) { - var cache = global.cache - var timespan = req.params.timespan + const cache = global.cache + let timespan = req.params.timespan if (_.isUndefined(timespan) || _.isNaN(timespan)) timespan = 0 if (_.isUndefined(cache)) { return res.status(400).send('Tag stats are still loading...') } - var tags = cache.get('tags:' + timespan + ':usage') + const tags = cache.get('tags:' + timespan + ':usage') - res.json({ success: true, tags: tags }) + res.json({ success: true, tags }) } /**