From 7fbd4addfc0dba9f117e089126ba338da338ccd0 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sat, 25 Feb 2017 19:21:52 -0500 Subject: [PATCH] Update user.dart --- lib/src/services/user.dart | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/src/services/user.dart b/lib/src/services/user.dart index 854ae52..27299eb 100644 --- a/lib/src/services/user.dart +++ b/lib/src/services/user.dart @@ -28,12 +28,9 @@ String hashPassword(String password) => /// /// Here, we extended the base service class. This allows to only expose /// specific methods, and also allows more freedom over things such as validation. -class UserService extends Service { - TypedService _inner; +class UserService extends TypedService { - UserService(DbCollection collection) : super() { - _inner = new TypedService(new MongoService(collection)); - } + UserService(DbCollection collection) : super(new MongoService(collection)); @override index([Map params]) { @@ -42,7 +39,7 @@ class UserService extends Service { throw new AngelHttpException.forbidden(); } - return _inner.index(params); + return super.index(params); } @override @@ -52,9 +49,6 @@ class UserService extends Service { throw new AngelHttpException.forbidden(); } - return _inner.create(data, params); + return super.create(data, params); } - - @override - read(id, [Map params]) => _inner.read(id, params); }