MCPcopy Create free account
hub / github.com/Kong/insomnia / patch

Function patch

packages/insomnia-data/node-src/services/settings.ts:24–28  ·  view source on GitHub ↗
(settingsPatch: Partial<Settings>)

Source from the content-addressed store, hash-verified

22}
23
24export async function patch(settingsPatch: Partial<Settings>) {
25 const settings = await getOrCreate();
26 const updatedSettings = await db.docUpdate<Settings>(settings, settingsPatch);
27 return updatedSettings;
28}
29
30export async function getOrCreate() {
31 const result = await db.findOne<Settings>(models.settings.type);

Callers

nothing calls this directly

Calls 1

getOrCreateFunction · 0.85

Tested by

no test coverage detected