diff --git a/CHANGELOG.md b/CHANGELOG.md index b5a0f800..2f522884 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 2.0.0-alpha.5 +* `MapService` methods now explicitly return `Map`. + # 2.0.0-alpha.4 * Renamed `waterfall` to `chain`. * Renamed `Routable.service` to `Routable.findService`. diff --git a/lib/src/core/map_service.dart b/lib/src/core/map_service.dart index c7d5f93f..adcc854e 100644 --- a/lib/src/core/map_service.dart +++ b/lib/src/core/map_service.dart @@ -47,7 +47,7 @@ class MapService extends Service> { } @override - Future index([Map params]) { + Future>> index([Map params]) { if (allowQuery == false || params == null || params['query'] is! Map) return new Future.value(items); else { @@ -66,14 +66,15 @@ class MapService extends Service> { } @override - Future read(String id, [Map params]) { + Future> read(String id, [Map params]) { return new Future.value(items.firstWhere(_matchesId(id), orElse: () => throw new AngelHttpException.notFound( message: 'No record found for ID $id'))); } @override - Future create(Map data, [Map params]) { + Future> create(Map data, + [Map params]) { if (data is! Map) throw new AngelHttpException.badRequest( message: @@ -92,7 +93,7 @@ class MapService extends Service> { } @override - Future modify(String id, Map data, + Future> modify(String id, Map data, [Map params]) { if (data is! Map) throw new AngelHttpException.badRequest( @@ -112,7 +113,7 @@ class MapService extends Service> { } @override - Future update(String id, Map data, + Future> update(String id, Map data, [Map params]) { if (data is! Map) throw new AngelHttpException.badRequest( @@ -140,7 +141,8 @@ class MapService extends Service> { } @override - Future remove(String id, [Map params]) { + Future> remove(String id, + [Map params]) { if (id == null || id == 'null' && (allowRemoveAll == true || diff --git a/pubspec.yaml b/pubspec.yaml index 7f660f26..ff50f815 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 2.0.0-alpha.4 +version: 2.0.0-alpha.5 description: > A high-powered HTTP server with DI, routing and more. When combined with the other packages in the Angel ecosystem, this