mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-10 23:48:09 -05:00
improvement(tools): improved formatting of confluence retrieve page tool, added oauth required param
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { NextRequest, NextResponse } from 'next/server'
|
||||
import { and, eq, like } from 'drizzle-orm'
|
||||
import { and, eq, like, or } from 'drizzle-orm'
|
||||
import { getSession } from '@/lib/auth'
|
||||
import { createLogger } from '@/lib/logs/console-logger'
|
||||
import { db } from '@/db'
|
||||
@@ -43,10 +43,15 @@ export async function POST(request: NextRequest) {
|
||||
.where(and(eq(account.userId, session.user.id), eq(account.providerId, providerId)))
|
||||
} else {
|
||||
// Otherwise, delete all accounts for this provider
|
||||
// We use LIKE to match all feature types (e.g., google-default, google-email, etc.)
|
||||
// Handle both exact matches (e.g., 'confluence') and prefixed matches (e.g., 'google-email')
|
||||
await db
|
||||
.delete(account)
|
||||
.where(and(eq(account.userId, session.user.id), like(account.providerId, `${provider}-%`)))
|
||||
.where(
|
||||
and(
|
||||
eq(account.userId, session.user.id),
|
||||
or(eq(account.providerId, provider), like(account.providerId, `${provider}-%`))
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
return NextResponse.json({ success: true }, { status: 200 })
|
||||
|
||||
@@ -5,7 +5,7 @@ import { BlockConfig } from '../types'
|
||||
export const ConfluenceBlock: BlockConfig<ConfluenceRetrieveResponse> = {
|
||||
type: 'confluence',
|
||||
name: 'Confluence',
|
||||
description: 'Use content from Confluence',
|
||||
description: 'Interact with Confluence',
|
||||
longDescription:
|
||||
'Connect to Confluence workspaces to retrieve and search documentation. Access page content, metadata, and integrate Confluence documentation into your workflows.',
|
||||
category: 'tools',
|
||||
|
||||
Reference in New Issue
Block a user