(userId: UserId, task: CheckHostsTaskValue)
| 273 | } |
| 274 | |
| 275 | async function saveUserCheckHostsTask(userId: UserId, task: CheckHostsTaskValue) { |
| 276 | const value = task as typeof userConfigs.$inferInsert.value |
| 277 | await db |
| 278 | .insert(userConfigs) |
| 279 | .values({ |
| 280 | userId, |
| 281 | key: CHECK_HOSTS_TASK_KEY, |
| 282 | value, |
| 283 | updatedAt: new Date(), |
| 284 | }) |
| 285 | .onConflictDoUpdate({ |
| 286 | target: [userConfigs.userId, userConfigs.key], |
| 287 | set: { |
| 288 | value, |
| 289 | updatedAt: new Date(), |
| 290 | }, |
| 291 | }) |
| 292 | return task |
| 293 | } |
| 294 | |
| 295 | async function getPublicBookmarkHostKeys() { |
| 296 | return await db.select({ hostKey: publicBookmarks.hostKey }).from(publicBookmarks) |
no outgoing calls
no test coverage detected