Skip to content

Commit 07ecb87

Browse files
committed
fix(ui): top groups not fetching correct data
1 parent 24993c9 commit 07ecb87

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/client/api/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ api.dashboard.getData = payload => {
2929
}
3030
api.dashboard.getTopGroups = payload => {
3131
const timespan = payload.timespan || 30
32-
return axios.get(`/api/v1/tickets/count/topgroups/${timespan}`).then(res => {
32+
return axios.get(`/api/v1/tickets/count/topgroups/${timespan}/5`).then(res => {
3333
return res.data
3434
})
3535
}

src/controllers/api/v1/tickets.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,17 +1703,17 @@ apiTickets.getTicketStatsForUser = function (req, res) {
17031703
*
17041704
*/
17051705
apiTickets.getTagCount = function (req, res) {
1706-
var cache = global.cache
1707-
var timespan = req.params.timespan
1706+
const cache = global.cache
1707+
let timespan = req.params.timespan
17081708
if (_.isUndefined(timespan) || _.isNaN(timespan)) timespan = 0
17091709

17101710
if (_.isUndefined(cache)) {
17111711
return res.status(400).send('Tag stats are still loading...')
17121712
}
17131713

1714-
var tags = cache.get('tags:' + timespan + ':usage')
1714+
const tags = cache.get('tags:' + timespan + ':usage')
17151715

1716-
res.json({ success: true, tags: tags })
1716+
res.json({ success: true, tags })
17171717
}
17181718

17191719
/**

0 commit comments

Comments
 (0)