diff --git a/src/app/api/native/git/branches/route.ts b/src/app/api/native/git/branches/route.ts index 6c4e0356..b95c88e4 100644 --- a/src/app/api/native/git/branches/route.ts +++ b/src/app/api/native/git/branches/route.ts @@ -244,7 +244,7 @@ async function handlePublish(branchName: string, localTaxonomyDir: string, remot return NextResponse.json({ error: 'Invalid contribution name for publish' }, { status: 400 }); } - console.log(`Publishing contribution from ${branchName} to remote taxonomy repo at ${REMOTE_TAXONOMY_ROOT_DIR}/taxonomy`); + console.log(`Publishing contribution from ${branchName} to remote taxonomy repo at ${remoteTaxonomyDir}`); const changes = await findDiff(branchName, localTaxonomyDir); // Check if there are any changes to publish, create a new branch at remoteTaxonomyDir and diff --git a/src/app/api/native/tree/route.ts b/src/app/api/native/tree/route.ts index 4e904b7b..889e087f 100644 --- a/src/app/api/native/tree/route.ts +++ b/src/app/api/native/tree/route.ts @@ -15,9 +15,9 @@ export async function POST(req: NextRequest) { const taxonomyRootPath = findTaxonomyRepoPath(); let dirPath = ''; if (root_path === 'skills') { - dirPath = path.join(taxonomyRootPath, 'taxonomy', SKILLS, dir_name); + dirPath = path.join(taxonomyRootPath, SKILLS, dir_name); } else { - dirPath = path.join(taxonomyRootPath, 'taxonomy', KNOWLEDGE, dir_name); + dirPath = path.join(taxonomyRootPath, KNOWLEDGE, dir_name); } const dirs = getFirstLevelDirectories(dirPath); return NextResponse.json({ data: dirs }, { status: 201 }); diff --git a/src/app/api/native/utils.ts b/src/app/api/native/utils.ts index 34ea3c4f..0b915392 100644 --- a/src/app/api/native/utils.ts +++ b/src/app/api/native/utils.ts @@ -90,5 +90,5 @@ export const findTaxonomyRepoPath = (): string => { if (remoteTaxonomyRepoDirFinal === '') { return ''; } - return remoteTaxonomyRepoDirFinal; + return path.join(remoteTaxonomyRepoDirFinal, '/taxonomy'); };