Werk hoofdapplicatie bij
Legt de bestaande wijzigingen in de hoofdworktree vast voordat de laatste worktree wordt gemerged.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,25 +1,28 @@
|
||||
class DashboardController {
|
||||
const ShoppingListRepository = require("../repositories/ShoppingListRepository");
|
||||
|
||||
class DashboardController {
|
||||
|
||||
index(req, res) {
|
||||
|
||||
const lists = ShoppingListRepository.getByHousehold(
|
||||
req.user.household_id
|
||||
);
|
||||
|
||||
const recentLists = lists.slice(0, 5);
|
||||
|
||||
res.locals.title = "Dashboard";
|
||||
|
||||
res.render(
|
||||
"dashboard/index",
|
||||
{
|
||||
|
||||
title: "Dashboard",
|
||||
|
||||
user: req.user
|
||||
|
||||
user: req.user,
|
||||
lists: recentLists,
|
||||
totalLists: lists.length
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
module.exports = new DashboardController();
|
||||
Reference in New Issue
Block a user