MCPcopy
hub / github.com/simstudioai/sim / saveState

Function saveState

apps/sim/lib/mcp/oauth/storage.ts:195–201  ·  view source on GitHub ↗
(rowId: string, state: string)

Source from the content-addressed store, hash-verified

193}
194
195export async function saveState(rowId: string, state: string): Promise<void> {
196 const now = new Date()
197 await db
198 .update(mcpServerOauth)
199 .set({ state: hashState(state), stateCreatedAt: now, updatedAt: now })
200 .where(eq(mcpServerOauth.id, rowId))
201}
202
203export async function clearTokens(rowId: string): Promise<void> {
204 await db

Callers 1

stateMethod · 0.90

Calls 3

hashStateFunction · 0.85
setMethod · 0.65
eqFunction · 0.50

Tested by

no test coverage detected