(rowId: string, state: string)
| 193 | } |
| 194 | |
| 195 | export 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 | |
| 203 | export async function clearTokens(rowId: string): Promise<void> { |
| 204 | await db |