tethys.backend/start/routes/api.ts

20 lines
673 B
TypeScript
Raw Normal View History

2023-03-03 15:54:28 +00:00
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');
2023-03-17 15:13:37 +00:00
Route.get('persons', 'AuthorsController.persons').as('author.persons');
2023-03-03 15:54:28 +00:00
// Route.get("author/:id", "TodosController.show");
// Route.put("author/update", "TodosController.update");
// Route.post("author", "TodosController.store");
});
// .middleware("auth:api");
})
.namespace('App/Controllers/Http/Api')
.prefix('api');