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

Function getTemplate

app/src/sqlite/template.ts:163–172  ·  view source on GitHub ↗
(templateId: TemplateId)

Source from the content-addressed store, hash-verified

161 })
162 },
163 async getTemplate(templateId: TemplateId) {
164 const templateDbId = toLDbId(templateId)
165 const template = await ky
166 .selectFrom('template')
167 .leftJoin('remoteTemplate', 'template.id', 'remoteTemplate.localId')
168 .selectAll()
169 .where('id', '=', templateDbId)
170 .execute()
171 return undefinedMap(template, toTemplate) ?? null
172 },
173 async getTemplateIdByRemoteId(templateId: RemoteTemplateId) {
174 const template = await ky
175 .selectFrom('template')

Callers

nothing calls this directly

Calls 2

toLDbIdFunction · 0.90
undefinedMapFunction · 0.90

Tested by

no test coverage detected