fix(auth): redirect to appUrl after invite callback
origin lacks /ims basePath; use NEXT_PUBLIC_APP_URL instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BzvzV91UqHZKM9P58qtvrA
This commit is contained in:
@@ -3,6 +3,7 @@ export const dynamic = 'force-dynamic'
|
||||
import { notFound, redirect } from 'next/navigation'
|
||||
import Link from 'next/link'
|
||||
import { createClient } from '@/lib/supabase/server'
|
||||
import { createAdminClient } from '@/lib/supabase/admin'
|
||||
import { CapaForm } from '@/components/capa/capa-form'
|
||||
|
||||
interface Props {
|
||||
@@ -23,7 +24,8 @@ export default async function NewCapaPage({ params }: Props) {
|
||||
.from('incidents').select('id, reference_no, status').eq('id', id).single()
|
||||
if (!incident) notFound()
|
||||
|
||||
const { data: users } = await supabase
|
||||
const admin = createAdminClient()
|
||||
const { data: users } = await admin
|
||||
.from('users')
|
||||
.select('id, name, department')
|
||||
.eq('role', 'capa_owner')
|
||||
|
||||
Reference in New Issue
Block a user