(id: string, title: string)
| 107 | } |
| 108 | |
| 109 | export async function updateThreadTitle(id: string, title: string): Promise<void> { |
| 110 | const database = await getDB(); |
| 111 | const deviceId = await getDeviceId(); |
| 112 | const syncVersion = await nextSyncVersion(database, "threads"); |
| 113 | const updatedAt = await nextUpdatedAt(database, "threads", id); |
| 114 | await database.execute( |
| 115 | "UPDATE threads SET title = ?, updated_at = ?, sync_version = ?, last_modified_by = ? WHERE id = ?", |
| 116 | [title, updatedAt, syncVersion, deviceId, id], |
| 117 | ); |
| 118 | } |
| 119 | |
| 120 | export async function deleteThread(id: string): Promise<void> { |
| 121 | const database = await getDB(); |
no test coverage detected