- feat: Enhance README with setup instructions, usage, and command documentation
- fix: Update API routes to include DOI URL handling and improve route organization - chore: Add ORCID preload rule file and ensure proper registration - docs: Add MIT License to the project for open-source compliance - feat: Implement command to detect and fix missing dataset cross-references - feat: Create command for updating DataCite DOI records with detailed logging and error handling - docs: Add comprehensive documentation for dataset indexing command - docs: Create detailed documentation for DataCite update command with usage examples and error handling
This commit is contained in:
parent
8f67839f93
commit
c049b22723
11 changed files with 2187 additions and 555 deletions
|
|
@ -8,14 +8,24 @@ import AvatarController from '#controllers/Http/Api/AvatarController';
|
|||
import UserController from '#controllers/Http/Api/UserController';
|
||||
import CollectionsController from '#controllers/Http/Api/collections_controller';
|
||||
import { middleware } from '../kernel.js';
|
||||
// API
|
||||
|
||||
// Clean DOI URL routes (no /api prefix)
|
||||
|
||||
// API routes with /api prefix
|
||||
router
|
||||
.group(() => {
|
||||
router.get('clients', [UserController, 'getSubmitters']).as('client.index').use(middleware.auth());;
|
||||
router.get('authors', [AuthorsController, 'index']).as('author.index').use(middleware.auth());;
|
||||
router.get('clients', [UserController, 'getSubmitters']).as('client.index').use(middleware.auth());
|
||||
router.get('authors', [AuthorsController, 'index']).as('author.index').use(middleware.auth());
|
||||
router.get('datasets', [DatasetController, 'index']).as('dataset.index');
|
||||
router.get('persons', [AuthorsController, 'persons']).as('author.persons');
|
||||
|
||||
// This should come BEFORE any other routes that might conflict
|
||||
router
|
||||
.get('/dataset/:prefix/:value', [DatasetController, 'findByIdentifier'])
|
||||
.where('prefix', /^10\.\d+$/) // Match DOI prefix pattern (10.xxxx)
|
||||
.where('value', /^[a-zA-Z0-9._-]+\.[0-9]+(?:\.[0-9]+)*$/) // Match DOI suffix pattern
|
||||
.as('dataset.findByIdentifier');
|
||||
|
||||
router.get('/dataset', [DatasetController, 'findAll']).as('dataset.findAll');
|
||||
router.get('/dataset/:publish_id', [DatasetController, 'findOne']).as('dataset.findOne');
|
||||
router.get('/sitelinks/:year', [HomeController, 'findDocumentsPerYear']);
|
||||
|
|
@ -35,7 +45,7 @@ router
|
|||
.as('apps.twofactor_backupcodes.create')
|
||||
.use(middleware.auth());
|
||||
|
||||
router.get('collections/:id', [CollectionsController, 'show']).as('collection.show')
|
||||
router.get('collections/:id', [CollectionsController, 'show']).as('collection.show');
|
||||
})
|
||||
// .namespace('App/Controllers/Http/Api')
|
||||
.prefix('api');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Preloaded File - node ace make:preload rules/orcid
|
||||
| ❯ Do you want to register the preload file in .adonisrc.ts file? (y/N) · true
|
||||
| Do you want to register the preload file in .adonisrc.ts file? (y/N) · true
|
||||
| DONE: create start/rules/orcid.ts
|
||||
| DONE: update adonisrc.ts file
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue