MCPcopy
hub / github.com/Kong/insomnia / get

Function get

packages/insomnia-data/node-src/services/user-session.ts:6–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4const { type } = models.userSession;
5
6export async function get() {
7 const result = await db.findOne<UserSession>(type);
8
9 if (!result) {
10 const user = await db.docCreate<UserSession>(type);
11 return user;
12 }
13 return result;
14}
15
16export async function update(patch: Partial<UserSession>) {
17 const user = await get();

Callers 2

updateFunction · 0.70
removeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected