Change parseId

This commit is contained in:
Tobe O 2018-11-06 14:24:38 -05:00
parent 0a6b228040
commit 7bdf36acd5

View file

@ -235,7 +235,7 @@ class Service<Id, Data> extends Routable {
get('/:id', (req, res) { get('/:id', (req, res) {
return req.parseQuery().then((query) { return req.parseQuery().then((query) {
return this.read( return this.read(
parseId(req.params['id']), parseId<Id>(req.params['id']),
mergeMap([ mergeMap([
{'query': query}, {'query': query},
restProvider, restProvider,
@ -254,7 +254,7 @@ class Service<Id, Data> extends Routable {
(req, res) => req.parseBody().then((body) { (req, res) => req.parseBody().then((body) {
return req.parseQuery().then((query) { return req.parseQuery().then((query) {
return this.modify( return this.modify(
parseId(req.params['id']), parseId<Id>(req.params['id']),
body as Data, body as Data,
mergeMap([ mergeMap([
{'query': query}, {'query': query},
@ -275,7 +275,7 @@ class Service<Id, Data> extends Routable {
(req, res) => req.parseBody().then((body) { (req, res) => req.parseBody().then((body) {
return req.parseQuery().then((query) { return req.parseQuery().then((query) {
return this.update( return this.update(
parseId(req.params['id']), parseId<Id>(req.params['id']),
body as Data, body as Data,
mergeMap([ mergeMap([
{'query': query}, {'query': query},
@ -293,7 +293,7 @@ class Service<Id, Data> extends Routable {
(req, res) => req.parseBody().then((body) { (req, res) => req.parseBody().then((body) {
return req.parseQuery().then((query) { return req.parseQuery().then((query) {
return this.update( return this.update(
parseId(req.params['id']), parseId<Id>(req.params['id']),
body as Data, body as Data,
mergeMap([ mergeMap([
{'query': query}, {'query': query},
@ -327,7 +327,7 @@ class Service<Id, Data> extends Routable {
delete('/:id', (req, res) { delete('/:id', (req, res) {
return req.parseQuery().then((query) { return req.parseQuery().then((query) {
return this.remove( return this.remove(
parseId(req.params['id']), parseId<Id>(req.params['id']),
mergeMap([ mergeMap([
{'query': query}, {'query': query},
restProvider, restProvider,