MCPcopy Create free account
hub / github.com/Treeki/BirdBridge / fetchUser

Method fetchUser

utils/userCache.ts:53–65  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

51 }
52
53 fetchUser(id: string): Promise<Record<string, any>> {
54 let entry = this.map.get(id);
55 if (entry !== undefined && !entry.invalid) {
56 console.log('Reusing user ID ' + id);
57 return entry.promise;
58 }
59
60 console.log('Fetching user ID ' + id);
61 const promise = plainFetchUser(this.oauth, id);
62 entry = new UserCacheEntry(id, promise);
63 this.map.set(id, entry);
64 return promise;
65 }
66}

Callers 1

main.tsFile · 0.80

Calls 2

plainFetchUserFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected