diff --git a/src/app/api/install-deps/route.ts b/src/app/api/install-deps/route.ts index 3a7b8d6..2c7ef3d 100644 --- a/src/app/api/install-deps/route.ts +++ b/src/app/api/install-deps/route.ts @@ -21,7 +21,7 @@ const pathExists = async (targetPath: string) => { export async function POST(req: NextRequest) { try { const json = await req.json(); - const { network, upgradeId, forceInstall } = json; + const { network, upgradeId } = json; if (!network || !upgradeId) { return NextResponse.json( @@ -31,7 +31,6 @@ export async function POST(req: NextRequest) { } const actualNetwork = network.toLowerCase(); - const shouldForceInstall = Boolean(forceInstall); const safePathPattern = /^[a-zA-Z0-9_-]+$/; if (!safePathPattern.test(actualNetwork) || !safePathPattern.test(upgradeId)) { @@ -67,24 +66,6 @@ export async function POST(req: NextRequest) { ); } - const libExistsBeforeInstall = await pathExists(libPath); - - if (!shouldForceInstall && libExistsBeforeInstall) { - console.log(`Deps already installed for ${actualNetwork}/${upgradeId}; skipping.`); - return NextResponse.json( - { - success: true, - message: `Dependencies already installed for ${actualNetwork}/${upgradeId}`, - libExists: true, - installed: false, - depsInstalled: false, - stdout: '', - stderr: '', - }, - { status: 200 } - ); - } - console.log( `Installing dependencies for ${actualNetwork}/${upgradeId} (cwd: ${resolvedUpgradePath})` );