blob: 2a3d36c12f547008a7e167672e0187f54524e324 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 | 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, params: Params ): Promise<Poll[]> {
    return this.app.service('polls').find({
      ...params,
      query: {
        authorId: id
      }
    });
  }
  setup(app: Application): void {
    this.app = app;
  }
}
 |