benjivers/notes Public Public: anyone can read this; nobody can change it.
Type the pin-aware update's five parameters
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 file
changed +1
−1
src/actions.ts +1 −1
| @@ -294,7 +294,7 @@ function update( | ||
| 294 | 294 | const touched: Note[] = []; |
| 295 | 295 | const note = db.transaction(() => { |
| 296 | 296 | const saved = db |
| 297 | .query<Note, [string, string, number, number]>( | |
| 297 | .query<Note, [string, string, number, number, number]>( | |
| 298 | 298 | // A pin is not an edit: only new words or a new title move a note up by recency. |
| 299 | 299 | "UPDATE note SET title = ?1, body = ?2, pinned = ?3, updated_at = CASE WHEN ?5 THEN strftime('%Y-%m-%dT%H:%M:%fZ', 'now') ELSE updated_at END WHERE id = ?4 RETURNING *", |
| 300 | 300 | ) |