- 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.
14 lines
414 B
JavaScript
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;
|