diff --git a/routes/ad/:period.js b/routes/ad/:period.js index 31da856..f392a6e 100644 --- a/routes/ad/:period.js +++ b/routes/ad/:period.js @@ -3,7 +3,7 @@ const Database = require('better-sqlite3') const page = require('../../page') const ds = require('../../index') -const db = new Database('./main.db') +const db = ds.db() module.exports.GET = async (req, res) => { /* @@ -17,7 +17,6 @@ module.exports.GET = async (req, res) => { // year-month const [year, month] = period.split(/-/) const articles = await ds.getArticlesByYearMonth(db, year, month) - console.log(year, month, articles) const out = await page.render('ad-year-month', { year, month, articles }) send(res, 200, out) } else { diff --git a/templates/ad-year-month.ejs b/templates/ad-year-month.ejs index 2e11054..92a9ae3 100644 --- a/templates/ad-year-month.ejs +++ b/templates/ad-year-month.ejs @@ -7,8 +7,8 @@
-
-

<%- year %>

+
<% let last = '' %> diff --git a/templates/ad-year.ejs b/templates/ad-year.ejs index b112355..abdf408 100644 --- a/templates/ad-year.ejs +++ b/templates/ad-year.ejs @@ -4,7 +4,7 @@ –––––––––––––––––––––––––––––––––––––––––––––––––– --> <%- include('_search') %> -
+