diff --git a/lib/src/routes/routes.dart b/lib/src/routes/routes.dart index 996cac0..846d665 100644 --- a/lib/src/routes/routes.dart +++ b/lib/src/routes/routes.dart @@ -31,7 +31,7 @@ configureAfter(Angel app) async { var req = await RequestContext.from(e.request, app); var res = new ResponseContext(e.request.response, app); res.render('error', {'message': 'Internal Server Error: ${e.error}'}); - await app.sendRequest(e.request, req, res); + await app.sendResponse(e.request, req, res); }; // Throw a 404 if no route matched the request diff --git a/lib/src/validators/user.dart b/lib/src/validators/user.dart new file mode 100644 index 0000000..9080ce7 --- /dev/null +++ b/lib/src/validators/user.dart @@ -0,0 +1,7 @@ +import 'package:angel_validate/angel_validate.dart'; + +final Validator CREATE_USER = new Validator({ + 'email*': [isString, isEmail], + 'username*': [isString, isNotEmpty], + 'password*': [isString, isNotEmpty] +});