import { validationResult } from "express-validator"; import { getUserByUsername } from "../../database/users.js"; import { listGames, newGame } from "../../database/games.js"; import { emptyBoard, Bag } from "../../utils/board.js"; function makePageData(user) { return { title: "Parties", user: user, games: listGames(user.id), formdata: { name: "", username: "", }, errors: {}, }; } export function root_get(req, res) { let page = makePageData(req.session.user); for (let i=0; i