Skip to content

Commit 289ab47

Browse files
committed
improvement(tools): improved formatting of confluence retrieve page tool, added oauth required param
1 parent 9da6443 commit 289ab47

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

sim/app/api/auth/oauth/disconnect/route.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NextRequest, NextResponse } from 'next/server'
2-
import { and, eq, like } from 'drizzle-orm'
2+
import { and, eq, like, or } from 'drizzle-orm'
33
import { getSession } from '@/lib/auth'
44
import { createLogger } from '@/lib/logs/console-logger'
55
import { db } from '@/db'
@@ -43,10 +43,15 @@ export async function POST(request: NextRequest) {
4343
.where(and(eq(account.userId, session.user.id), eq(account.providerId, providerId)))
4444
} else {
4545
// Otherwise, delete all accounts for this provider
46-
// We use LIKE to match all feature types (e.g., google-default, google-email, etc.)
46+
// Handle both exact matches (e.g., 'confluence') and prefixed matches (e.g., 'google-email')
4747
await db
4848
.delete(account)
49-
.where(and(eq(account.userId, session.user.id), like(account.providerId, `${provider}-%`)))
49+
.where(
50+
and(
51+
eq(account.userId, session.user.id),
52+
or(eq(account.providerId, provider), like(account.providerId, `${provider}-%`))
53+
)
54+
)
5055
}
5156

5257
return NextResponse.json({ success: true }, { status: 200 })

sim/blocks/blocks/confluence.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { BlockConfig } from '../types'
55
export const ConfluenceBlock: BlockConfig<ConfluenceRetrieveResponse> = {
66
type: 'confluence',
77
name: 'Confluence',
8-
description: 'Use content from Confluence',
8+
description: 'Interact with Confluence',
99
longDescription:
1010
'Connect to Confluence workspaces to retrieve and search documentation. Access page content, metadata, and integrate Confluence documentation into your workflows.',
1111
category: 'tools',

0 commit comments

Comments
 (0)