diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-12 17:00:48 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-12 17:00:48 +0300 |
commit | f2573a28748a3c7983b730be2c775e024d0cdaa0 (patch) | |
tree | 3498b60c2870e40294c8e1bc62d692e4c12ea633 /services/profile/profile.class.ts | |
parent | fb889145e2e3414925553152e8aff6a096bc0cae (diff) | |
download | which-api-f2573a28748a3c7983b730be2c775e024d0cdaa0.tar.gz |
refactor: move Profiles class to separate file
Diffstat (limited to 'services/profile/profile.class.ts')
-rw-r--r-- | services/profile/profile.class.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/profile/profile.class.ts b/services/profile/profile.class.ts new file mode 100644 index 0000000..d4e7b02 --- /dev/null +++ b/services/profile/profile.class.ts @@ -0,0 +1,9 @@ +import { Poll, PollSchema } from "../../models/polls/poll.schema"; +import PollModel from '../../models/polls/poll.model'; + +export default class Profiles { + async get(id: string, params: any): Promise<PollSchema[]> { + return PollModel.find({ authorId: id }); + } +}; + |