All checks were successful
CI / container-job (push) Successful in 49s
- Modified Api/Authors.Controller.ts to use only personal types and sort by dataset_count. - Completely rewritten AvatarController.ts. - Added new Api/CollectionsController.ts for querying collections and collection_roles. - Modified Api/DatasetController.ts to preload titles, identifier and order by server_date_published. - Modified FileController.ts to serve files from /storage/app/data/ instead of /storage/app/public. - Added new Api/UserController for requesting submitters (getSubmitters). - Improved OaiController.ts with performant DB queries for better ResumptionToken handling. - Modified Submitter/DatasetController.ts by adding a categorize method for library classification. - Rewritten ResumptionToken.ts. - Improved TokenWorkerService.ts to utilize browser fingerprint. - Edited dataset.ts by adding the doiIdentifier property. - Enhanced person.ts to improve the fullName property. - Completely rewritten AsideMenuItem.vue component. - Updated CarBoxClient.vue to use TypeScript. - Added new CardBoxDataset.vue for displaying recent datasets on the dashboard. - Completely rewritten TableSampleClients.vue for the dashboard. - Completely rewritten UserAvatar.vue. - Made small layout changes in Dashboard.vue. - Added new Category.vue for browsing scientific collections. - Adapted the pinia store in main.ts. - Added additional routes in start/routes.ts and start/api/routes.ts. - Improved referenceValidation.ts for better ISBN existence checking. - NPM dependency updates.
41 lines
2.1 KiB
TypeScript
41 lines
2.1 KiB
TypeScript
import router from '@adonisjs/core/services/router';
|
|
|
|
import AuthorsController from '#controllers/Http/Api/AuthorsController';
|
|
import DatasetController from '#controllers/Http/Api/DatasetController';
|
|
import HomeController from '#controllers/Http/Api/HomeController';
|
|
import FileController from '#controllers/Http/Api/FileController';
|
|
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
|
|
router
|
|
.group(() => {
|
|
router.get('clients', [UserController, 'getSubmitters']).as('client.index');
|
|
router.get('authors', [AuthorsController, 'index']).as('author.index');
|
|
router.get('datasets', [DatasetController, 'index']).as('dataset.index');
|
|
router.get('persons', [AuthorsController, 'persons']).as('author.persons');
|
|
|
|
router.get('/dataset', [DatasetController, 'findAll']).as('dataset.findAll');
|
|
router.get('/dataset/:publish_id', [DatasetController, 'findOne']).as('dataset.findOne');
|
|
router.get('/sitelinks/:year', [HomeController, 'findDocumentsPerYear']);
|
|
router.get('/years', [HomeController, 'findYears']);
|
|
router.get('/statistic/:year', [HomeController, 'findPublicationsPerMonth']);
|
|
|
|
router.get('/download/:id', [FileController, 'findOne']).as('file.findOne');
|
|
|
|
router.get('/avatar/:name/:background?/:textColor?/:size?', [AvatarController, 'generateAvatar']);
|
|
|
|
router
|
|
.post('/twofactor_totp/settings/enable/:state/:code?', [UserController, 'enable'])
|
|
.as('apps.twofactor_totp.enable')
|
|
.use(middleware.auth());
|
|
router
|
|
.post('/twofactor_backupcodes/settings/create', [UserController, 'createCodes'])
|
|
.as('apps.twofactor_backupcodes.create')
|
|
.use(middleware.auth());
|
|
|
|
router.get('collections/:id', [CollectionsController, 'show']).as('collection.show')
|
|
})
|
|
// .namespace('App/Controllers/Http/Api')
|
|
.prefix('api');
|