feat(api): refs routes
Add lib/api/routes/refs.js: list with space_id/kind filters and paginated, create, get/patch/delete by id, and /upsert that maps to repo.upsertByExternal for idempotent capture-source ingest. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
projectsScopedRouter as tasksByProjectRouter
|
||||
} from './routes/tasks.js';
|
||||
import { router as pagesRouter, spacesScopedRouter as pagesBySpaceRouter } from './routes/pages.js';
|
||||
import { router as refsRouter } from './routes/refs.js';
|
||||
|
||||
export function mountApi(app) {
|
||||
const api = Router();
|
||||
@@ -22,6 +23,7 @@ export function mountApi(app) {
|
||||
api.use('/projects/:project_id/tasks', tasksByProjectRouter);
|
||||
api.use('/tasks', tasksRouter);
|
||||
api.use('/pages', pagesRouter);
|
||||
api.use('/refs', refsRouter);
|
||||
|
||||
api.use((_req, _res, next) => next(new NotFoundError('route not found')));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user