fix: always updated all articles
This commit is contained in:
parent
005fd864b2
commit
4a7960f183
1
articles
Submodule
1
articles
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 3744bd78995594e5fdfcaeff32f426f1d41daffa
|
|
@ -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)',
|
'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]
|
[id, title, category, released_at, updated_at, tags, image, publish, content]
|
||||||
);
|
);
|
||||||
// } else if (res.rows[0].updated_at < updated_at) {
|
} else if (res.rows[0].updated_at < updated_at) {
|
||||||
} else if (true) {
|
// } else if (true) {
|
||||||
console.log(`Update article: ${id}`);
|
console.log(`Update article: ${id}`);
|
||||||
await db.query(
|
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',
|
'update article set title = $2, category = $3, released_at = $4, updated_at = $5, tags = $6, image = $7, publish = $8, content = $9 where id = $1',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user