Skip to content

Commit

Permalink
chore: correcting language change
Browse files Browse the repository at this point in the history
Signed-off-by: Aditya-eddy <[email protected]>
  • Loading branch information
Aditya-eddy committed Oct 30, 2024
1 parent 669f16a commit 48b699a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/api/createFileStructure/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@ export async function GET(
): Promise<NextResponse<Directory | ErrorResponse>> {
const url = new URL(req.url);
const projectKey = url.searchParams.get('project');

if (!projectKey || !pathsMap[projectKey]) {
return NextResponse.json({ message: 'Invalid or missing project key' }, { status: 400 });
}

const basePath = process.cwd();
const projectPath = join(basePath, 'components', 'atg', 'demo-projects', 'projects', 'javaScript');

const projectPath = join(basePath, pathsMap[projectKey]);
// Check if path exists before proceeding
if (!existsSync(projectPath)) {
console.error(`Path does not exist: ${projectPath}`);
Expand Down

0 comments on commit 48b699a

Please sign in to comment.