|
@ -63,9 +63,13 @@ class HomeController extends SiteController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async getHome (req, res, next) { |
|
|
async getHome (req, res, next) { |
|
|
const { announcement: announcementService } = this.dtp.services; |
|
|
const { announcement: announcementService, hive: hiveService } = this.dtp.services; |
|
|
try { |
|
|
try { |
|
|
res.locals.announcements = await announcementService.getLatest(req.user); |
|
|
res.locals.announcements = await announcementService.getLatest(req.user); |
|
|
|
|
|
|
|
|
|
|
|
res.locals.pagination = this.getPaginationParameters(req, 20); |
|
|
|
|
|
res.locals.constellationTimeline = await hiveService.getConstellationTimeline(req.user, res.locals.pagination); |
|
|
|
|
|
|
|
|
res.render('index'); |
|
|
res.render('index'); |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
this.log.error('failed to render home view', { error }); |
|
|
this.log.error('failed to render home view', { error }); |
|
|