mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-04-30 09:21:33 +00:00
28 lines
578 B
JavaScript
Executable File
28 lines
578 B
JavaScript
Executable File
/**
|
|
* PROJECT PATH RESOLUTION
|
|
* =======================
|
|
*
|
|
* Routes address projects by DB `projectId` and resolve their absolute
|
|
* workspace path through this module.
|
|
*/
|
|
|
|
import { projectsDb } from './modules/database/index.js';
|
|
|
|
/**
|
|
* Resolve the absolute project path for a database `projectId`.
|
|
*
|
|
* Returns `null` when the id doesn't match any row so callers can respond
|
|
* with a 404.
|
|
*/
|
|
async function getProjectPathById(projectId) {
|
|
if (!projectId) {
|
|
return null;
|
|
}
|
|
|
|
return projectsDb.getProjectPathById(projectId);
|
|
}
|
|
|
|
export {
|
|
getProjectPathById
|
|
};
|