From 499a1aab64a7831e25711c0ae640f3d4dfffefd3 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 28 Jun 2020 04:05:44 +0300 Subject: fix: add missing params to profile redirect --- services/profiles/profiles.class.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'services/profiles/profiles.class.ts') diff --git a/services/profiles/profiles.class.ts b/services/profiles/profiles.class.ts index 3461cbc..2a3d36c 100644 --- a/services/profiles/profiles.class.ts +++ b/services/profiles/profiles.class.ts @@ -1,12 +1,14 @@ import { Application } from '@feathersjs/express'; +import { Params } from '@feathersjs/feathers'; import { Poll } from 'which-types'; export default class Profiles { app!: Application; - async get(id: string): Promise { + async get(id: string, params: Params ): Promise { return this.app.service('polls').find({ + ...params, query: { authorId: id } -- cgit v1.2.3 From bdd8b947e89400606ec1d7e1bd04f3794e942c12 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 28 Jun 2020 04:11:45 +0300 Subject: style: fix linting errors --- services/profiles/profiles.class.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/profiles/profiles.class.ts') diff --git a/services/profiles/profiles.class.ts b/services/profiles/profiles.class.ts index 2a3d36c..a6de474 100644 --- a/services/profiles/profiles.class.ts +++ b/services/profiles/profiles.class.ts @@ -6,7 +6,7 @@ import { Poll } from 'which-types'; export default class Profiles { app!: Application; - async get(id: string, params: Params ): Promise { + async get(id: string, params: Params): Promise { return this.app.service('polls').find({ ...params, query: { -- cgit v1.2.3