Changeset 8151340 in Klonkt for src/services/ArchiveExportService.js
- Timestamp:
- 09/04/2026 12:05:08 PM (4 days ago)
- Branches:
- main
- Children:
- 9946a68
- Parents:
- aa521c3
- File:
-
- 1 edited
-
src/services/ArchiveExportService.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ArchiveExportService.js
raa521c3 r8151340 18 18 import path from 'path'; 19 19 import crypto from 'crypto'; 20 import db from '../config/database.js';20 import db, { isoSql } from '../config/database.js'; 21 21 import { MEDIA_ROOT, resolveAudioPath } from '../config/paths.js'; 22 22 … … 494 494 // is de volgorde van twee posts op dezelfde seconde niet bepaald. 495 495 const posts = db.prepare(`SELECT * FROM posts WHERE site_id = ? 496 ORDER BY COALESCE(published_at, created_at)ASC, id ASC`).all(site.id);496 ORDER BY ${isoSql('COALESCE(published_at, created_at)')} ASC, id ASC`).all(site.id); 497 497 498 498 for (const post of posts) { … … 539 539 try { 540 540 replies = db.prepare(`SELECT * FROM ap_interactions WHERE post_id = ? AND kind = 'reply' 541 ORDER BY COALESCE(published, created_at)ASC, id ASC`).all(post.id);541 ORDER BY ${isoSql('COALESCE(published, created_at)')} ASC, id ASC`).all(post.id); 542 542 } catch { /* tabel kan ontbreken op een heel oude database */ } 543 543 if (replies.length) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)