MCPcopy Create free account
hub / github.com/AlexErrant/Pentive / hasRemoteTemplate

Function hasRemoteTemplate

app/src/sqlite/template.ts:331–338  ·  view source on GitHub ↗
(remoteTemplateId: RemoteTemplateId)

Source from the content-addressed store, hash-verified

329 },
330 updateRemotes,
331 async hasRemoteTemplate(remoteTemplateId: RemoteTemplateId) {
332 const r = await ky
333 .selectFrom('remoteTemplate')
334 .where('remoteId', '=', toLDbId(remoteTemplateId))
335 .select(ky.fn.count<SqliteCount>('remoteId').as('count'))
336 .executeTakeFirstOrThrow()
337 return r.count >= 1
338 },
339}
340
341type Nullable<T> = { [K in keyof T]: T[K] | null }

Callers

nothing calls this directly

Calls 1

toLDbIdFunction · 0.90

Tested by

no test coverage detected