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>
28 lines
584 B
JavaScript
28 lines
584 B
JavaScript
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",
|
|
{
|
|
user: req.user,
|
|
lists: recentLists,
|
|
totalLists: lists.length
|
|
}
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = new DashboardController(); |