forked from geolba/tethys.backend
Arno Kaimbacher
ebc62d9117
- added PersonalTotpSettings.vue vor enablin/disabling 2FA - changed User.ts: added attributes: state, twoFactorSecret and twoFactorRecoveryCodes - added resources/js/utils/toast.ts for notifications - modified start/routes/api.ts - npm updates
31 lines
1.4 KiB
TypeScript
31 lines
1.4 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');
|
|
|
|
Route.get('/avatar/:name/:background?/:textColor?/:size?', 'AvatarController.generateAvatar');
|
|
|
|
|
|
Route.post('/twofactor_totp/settings/enable/:state/:code?', 'UserController.enable').as('apps.twofactor_totp.enable') .middleware(['auth']);;
|
|
});
|
|
// .middleware("auth:api");
|
|
})
|
|
.namespace('App/Controllers/Http/Api')
|
|
.prefix('api');
|