From 20c6aedaa3d64f5054617e9ab1603eeda44de841 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Tue, 11 Sep 2018 16:14:31 -0400 Subject: [PATCH] Add --- lib/src/core/service.dart | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/src/core/service.dart b/lib/src/core/service.dart index d243b18c..5aaf4149 100644 --- a/lib/src/core/service.dart +++ b/lib/src/core/service.dart @@ -51,7 +51,7 @@ class Providers { /// A front-facing interface that can present data to and operate on data on behalf of the user. /// /// Heavily inspired by FeathersJS. <3 -class Service extends Routable { +class Service extends Routable { /// A [List] of keys that services should ignore, should they see them in the query. static const List specialQueryKeys = [ r'$limit', @@ -102,27 +102,27 @@ class Service extends Routable { } /// Retrieves the desired resource. - Future read(id, [Map params]) { + Future read(Id id, [Map params]) { throw new AngelHttpException.methodNotAllowed(); } /// Creates a resource. - Future create(data, [Map params]) { + Future create(Data data, [Map params]) { throw new AngelHttpException.methodNotAllowed(); } /// Modifies a resource. - Future modify(id, data, [Map params]) { + Future modify(Id id, Data data, [Map params]) { throw new AngelHttpException.methodNotAllowed(); } /// Overwrites a resource. - Future update(id, data, [Map params]) { + Future update(Id id, Data data, [Map params]) { throw new AngelHttpException.methodNotAllowed(); } /// Removes the given resource. - Future remove(id, [Map params]) { + Future remove(Id id, [Map params]) { throw new AngelHttpException.methodNotAllowed(); } @@ -185,7 +185,7 @@ class Service extends Routable { return req.parseBody().then((body) { return this .create( - body, + body as Data, mergeMap([ {'query': query}, restProvider, @@ -229,7 +229,7 @@ class Service extends Routable { return req.parseQuery().then((query) { return this.modify( parseId(req.params['id']), - body, + body as Data, mergeMap([ {'query': query}, restProvider, @@ -250,7 +250,7 @@ class Service extends Routable { return req.parseQuery().then((query) { return this.update( parseId(req.params['id']), - body, + body as Data, mergeMap([ {'query': query}, restProvider, @@ -268,7 +268,7 @@ class Service extends Routable { return req.parseQuery().then((query) { return this.update( parseId(req.params['id']), - body, + body as Data, mergeMap([ {'query': query}, restProvider,