import { RequestHandler } from "../entities/RequestHandler"; import { NotificationsHelper } from "../helpers/NotificationsHelper"; /** * Notifications controller * * @author Pierre HUBERT */ export class NotificationsController { /** * Get the number of unread notifications * * @param h Request handler */ public static async CountUnread(h: RequestHandler) { h.send({ number: await NotificationsHelper.CountUnread(h.getUserId()) }); } }