Skip to content
Snippets Groups Projects
Commit 6be11a9d authored by echicken's avatar echicken :chicken:
Browse files

Functions to make requests to new group/sub unread endpoints

parent ddfefda4
No related branches found
No related tags found
No related merge requests found
......@@ -275,6 +275,11 @@ async function getSubUnreadCount(sub) {
onSubUnreadCount(res);
}
async function getSubUnreadCounts(grp) {
const res = await v4_get('./api/forum.ssjs?call=get-sub-unread-counts&group=' + grp);
onSubUnreadCount(res);
}
function onGroupUnreadCount(data) {
for (group in data) {
$('#badge-scanned-' + group).text(
......@@ -294,6 +299,11 @@ async function getGroupUnreadCount(group) {
onGroupUnreadCount(res);
}
async function getGroupUnreadCounts() {
const res = await v4_get('./api/forum.ssjs?call=get-group-unread-counts');
onGroupUnreadCount(res);
}
function onThreadStats(data) {
Object.keys(data).forEach(e => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment