mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-19 07:42:43 +00:00
fix: raycast org selection based api key creation (#447)
This commit is contained in:
parent
050b241fb6
commit
c3f1647a70
2 changed files with 8 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -7,6 +7,7 @@ drizzle.config.ts
|
|||
node_modules
|
||||
.pnp
|
||||
.pnp.js
|
||||
bun.lock
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
|
|
|
|||
|
|
@ -259,6 +259,10 @@ export function IntegrationsView() {
|
|||
|
||||
const createRaycastApiKeyMutation = useMutation({
|
||||
mutationFn: async () => {
|
||||
if (!org?.id) {
|
||||
throw new Error("Organization ID is required")
|
||||
}
|
||||
|
||||
const res = await authClient.apiKey.create({
|
||||
metadata: {
|
||||
organizationId: org?.id,
|
||||
|
|
@ -287,12 +291,13 @@ export function IntegrationsView() {
|
|||
if (
|
||||
qParam === "raycast" &&
|
||||
!hasTriggeredRaycast &&
|
||||
!createRaycastApiKeyMutation.isPending
|
||||
!createRaycastApiKeyMutation.isPending &&
|
||||
org?.id
|
||||
) {
|
||||
setHasTriggeredRaycast(true)
|
||||
createRaycastApiKeyMutation.mutate()
|
||||
}
|
||||
}, [searchParams, hasTriggeredRaycast, createRaycastApiKeyMutation])
|
||||
}, [searchParams, hasTriggeredRaycast, createRaycastApiKeyMutation, org])
|
||||
|
||||
const handleShortcutClick = (shortcutType: "add" | "search") => {
|
||||
setSelectedShortcutType(shortcutType)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue