feat: add photos route with sitemap indexing and status endpoints
This commit is contained in:
1 parent
95799add1d
commit
ab8ed85c84
1 file changed
+1
-1
@@ -36,7 +36,7 @@ async function indexSitemaps(pool) {
|
|||||||
const values = batch.map((r, j) => `($${j * 2 + 1}, $${j * 2 + 2})`).join(', ');
|
const values = batch.map((r, j) => `($${j * 2 + 1}, $${j * 2 + 2})`).join(', ');
|
||||||
const params = batch.flatMap(r => [r.code, r.url]);
|
const params = batch.flatMap(r => [r.code, r.url]);
|
||||||
await pool.query(
|
await pool.query(
|
||||||
`INSERT INTO ff_photo_index (photo_code, product_url, indexed_at)
|
`INSERT INTO ff_photo_index (photo_code, product_url)
|
||||||
VALUES ${values}
|
VALUES ${values}
|
||||||
ON CONFLICT (photo_code) DO UPDATE
|
ON CONFLICT (photo_code) DO UPDATE
|
||||||
SET product_url = EXCLUDED.product_url, indexed_at = NOW()`,
|
SET product_url = EXCLUDED.product_url, indexed_at = NOW()`,
|
||||||
|
|||||||
Reference in new issue
Block a user