Arno Kaimbacher
d8bdce1369
All checks were successful
CI Pipeline / japa-tests (push) Successful in 53s
- added API File Controller for downloading files e.g. /api/download/1022 - also create has codes by submitting new dataset - added edit dataset functionalities for role submitter - added the following route for role submitter: /dataset/:id/update', 'DatasetController.update' - created extra UpdateDatasetValidator.ts for validating updated dataset - npm updates
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
import Route from '@ioc:Adonis/Core/Route';
|
|
|
|
// API
|
|
Route.group(() => {
|
|
// Route.post("register", "AuthController.register");
|
|
// Route.post("login", "AuthController.login");
|
|
|
|
Route.group(() => {
|
|
Route.get('authors', 'AuthorsController.index').as('author.index');
|
|
Route.get('datasets', 'DatasetController.index').as('dataset.index');
|
|
Route.get('persons', 'AuthorsController.persons').as('author.persons');
|
|
// Route.get("author/:id", "TodosController.show");
|
|
// Route.put("author/update", "TodosController.update");
|
|
// Route.post("author", "TodosController.store");
|
|
Route.get('/dataset', 'DatasetController.findAll').as('dataset.findAll');
|
|
Route.get('/dataset/:publish_id', 'DatasetController.findOne').as('dataset.findOne');
|
|
Route.get('/sitelinks/:year', 'HomeController.findDocumentsPerYear');
|
|
Route.get('/years', 'HomeController.findYears');
|
|
|
|
Route.get('/download/:id', 'FileController.findOne').as('file.findOne');
|
|
});
|
|
// .middleware("auth:api");
|
|
})
|
|
.namespace('App/Controllers/Http/Api')
|
|
.prefix('api');
|