diff options
Diffstat (limited to 'app/api/sync/config/route.ts')
| -rw-r--r-- | app/api/sync/config/route.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/api/sync/config/route.ts b/app/api/sync/config/route.ts index e54762fc..db5d17ca 100644 --- a/app/api/sync/config/route.ts +++ b/app/api/sync/config/route.ts @@ -6,10 +6,10 @@ import { authOptions } from "@/app/api/auth/[...nextauth]/route" export async function GET(request: NextRequest) { try { const { searchParams } = new URL(request.url) - const contractId = searchParams.get('contractId') + const projectId = searchParams.get('projectId') const targetSystem = searchParams.get('targetSystem') || 'SHI' - if (!contractId) { + if (!projectId) { return NextResponse.json( { error: 'Contract ID is required' }, { status: 400 } @@ -17,7 +17,7 @@ export async function GET(request: NextRequest) { } const config = await syncService.getSyncConfig( - parseInt(contractId), + parseInt(projectId), targetSystem ) @@ -48,7 +48,7 @@ export async function POST(request: NextRequest) { } const body = await request.json() const { - contractId, + projectId, targetSystem, endpointUrl, authToken, @@ -57,7 +57,7 @@ export async function POST(request: NextRequest) { maxBatchSize } = body - if (!contractId || !targetSystem || !endpointUrl) { + if (!projectId || !targetSystem || !endpointUrl) { return NextResponse.json( { error: 'Contract ID, target system, and endpoint URL are required' }, { status: 400 } @@ -65,7 +65,7 @@ export async function POST(request: NextRequest) { } await syncService.upsertSyncConfig({ - contractId, + projectId, targetSystem, endpointUrl, authToken, |
