Add JWT auth for protected routes, add /reg endpoint, remove /user endpoints
This commit is contained in:
@@ -7,7 +7,6 @@ import 'package:shelf_router/shelf_router.dart';
|
||||
|
||||
import 'database/database_provider.dart';
|
||||
import 'routes/auth_routes.dart';
|
||||
import 'routes/user_routes.dart';
|
||||
import 'routes/geo_routes.dart';
|
||||
|
||||
void main(List<String> args) async {
|
||||
@@ -19,12 +18,10 @@ void main(List<String> args) async {
|
||||
});
|
||||
|
||||
final authRoutes = AuthRoutes(database);
|
||||
final userRoutes = UserRoutes(database);
|
||||
final geoRoutes = GeoRoutes(database);
|
||||
|
||||
final router = Router()
|
||||
..mount('', authRoutes.routes.call)
|
||||
..mount('', userRoutes.routes.call)
|
||||
..mount('', geoRoutes.routes.call)
|
||||
..get('/', (Request req) => Response.ok('Family Safety Tracker API\n'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user