Files
Playwright-A11y-Dashboard/routes/index.js
Keith Solomon 4020b33293 Refactor routes and views for improved clarity and functionality
- Commented out console log in the home route to reduce clutter in logs.
- Updated formatting and consistency in the sites route, including removing unused domain fetching functionality.
- Added form action to the add-form view for submitting new sites, ensuring the input field is properly named for backend processing.
2025-05-25 17:53:13 -05:00

14 lines
414 B
JavaScript

const express = require('express');
const router = express.Router();
const SiteModel = require('../models/SiteModel');
const sitesModel = new SiteModel();
/* GET home page. */
router.get('/', async function(req, res, next) {
const sites = await sitesModel.getAll();
// console.log('Sites:', sites);
res.render('index', { title: 'Playwright Testing Dashboard', sites: sites });
});
module.exports = router;