()
| 5 | let gotHostMeta: HostMeta | undefined; |
| 6 | |
| 7 | export async function setHostMeta() { |
| 8 | const [existing] = await db.select().from(hostMeta).limit(1); |
| 9 | |
| 10 | if (existing && existing.hostMetaId) { |
| 11 | return; |
| 12 | } |
| 13 | |
| 14 | const id = uuidv4(); |
| 15 | |
| 16 | await db |
| 17 | .insert(hostMeta) |
| 18 | .values({ hostMetaId: id, createdAt: new Date().getTime() }); |
| 19 | } |
| 20 | |
| 21 | export async function getHostMeta() { |
| 22 | if (gotHostMeta) { |
no outgoing calls
no test coverage detected