diff --git a/articles b/articles new file mode 160000 index 0000000..3744bd7 --- /dev/null +++ b/articles @@ -0,0 +1 @@ +Subproject commit 3744bd78995594e5fdfcaeff32f426f1d41daffa diff --git a/src/lib/server/database/init.ts b/src/lib/server/database/init.ts index e5b1285..f57c908 100644 --- a/src/lib/server/database/init.ts +++ b/src/lib/server/database/init.ts @@ -141,8 +141,8 @@ export default async function init(db: Postgres) { 'insert into article (id, title, category, released_at, updated_at, tags, image, publish, content) values ($1, $2, $3, $4, $5, $6, $7, $8, $9)', [id, title, category, released_at, updated_at, tags, image, publish, content] ); - // } else if (res.rows[0].updated_at < updated_at) { - } else if (true) { + } else if (res.rows[0].updated_at < updated_at) { + // } else if (true) { console.log(`Update article: ${id}`); await db.query( 'update article set title = $2, category = $3, released_at = $4, updated_at = $5, tags = $6, image = $7, publish = $8, content = $9 where id = $1',