- Add OpenSpec experimental workflow with commands (opsx-apply, opsx-archive, opsx-explore, opsx-propose) - Add Serena memory system for project context - Implement User API (UserController, UserModel, routes) - Add Specimen delete endpoint - Update Test definitions and Routes - Sync API documentation (OpenAPI) - Archive completed 2026-03-08-backend-specs change
43 lines
1.8 KiB
PHP
43 lines
1.8 KiB
PHP
// ============================================================================
|
|
// ADD THESE ROUTES TO: app/Config/Routes.php
|
|
// ============================================================================
|
|
|
|
// Add this inside the '$routes->group('api', function ($routes) {' section
|
|
// Preferably after the Organization routes and before the Specimen routes
|
|
|
|
// Users Management
|
|
$routes->group('users', function ($routes) {
|
|
$routes->get('/', 'User\UserController::index');
|
|
$routes->get('(:num)', 'User\UserController::show/$1');
|
|
$routes->post('/', 'User\UserController::create');
|
|
$routes->patch('/', 'User\UserController::update');
|
|
$routes->delete('(:num)', 'User\UserController::delete/$1');
|
|
});
|
|
|
|
// ============================================================================
|
|
// SPECIMEN DELETE ROUTE
|
|
// Add this INSIDE the existing specimen group (around line 256-296)
|
|
// ============================================================================
|
|
|
|
$routes->group('specimen', function ($routes) {
|
|
// ... existing routes ...
|
|
|
|
// ADD THIS LINE:
|
|
$routes->delete('(:num)', 'Specimen\SpecimenController::delete/$1');
|
|
|
|
// ... rest of existing routes ...
|
|
});
|
|
|
|
// ============================================================================
|
|
// COMPLETE EXAMPLE - Users route placement in context
|
|
// ============================================================================
|
|
|
|
// Master Data section (after Equipment, before Specimen)
|
|
$routes->group('users', function ($routes) {
|
|
$routes->get('/', 'User\UserController::index');
|
|
$routes->get('(:num)', 'User\UserController::show/$1');
|
|
$routes->post('/', 'User\UserController::create');
|
|
$routes->patch('/', 'User\UserController::update');
|
|
$routes->delete('(:num)', 'User\UserController::delete/$1');
|
|
});
|