aboutsummaryrefslogtreecommitdiff
path: root/services/feed/feed.class.ts
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-06-27 18:33:02 +0300
committerGitHub <noreply@github.com>2020-06-27 18:33:02 +0300
commit990edc953d734b1f1621fc0f5161c1eb978a3ea0 (patch)
treea8759f1d34e55d809a5b702fdca60a82117e1a2e /services/feed/feed.class.ts
parent08994137ddbeee5c3d407c215575e9681fd3962b (diff)
parent0a6a6be1b43635c60e76669ac2a7ee8581d9b183 (diff)
downloadwhich-api-990edc953d734b1f1621fc0f5161c1eb978a3ea0.tar.gz
Merge pull request #14 from which-ecosystem/feed
Feed endpoint
Diffstat (limited to 'services/feed/feed.class.ts')
-rw-r--r--services/feed/feed.class.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/services/feed/feed.class.ts b/services/feed/feed.class.ts
new file mode 100644
index 0000000..ceb86e6
--- /dev/null
+++ b/services/feed/feed.class.ts
@@ -0,0 +1,17 @@
+import { Application } from '@feathersjs/express';
+import { Params } from '@feathersjs/feathers';
+import { Poll } from 'which-types';
+
+
+export default class Feed {
+ app!: Application;
+
+ async find(params: Params): Promise<Poll[]> {
+ return this.app.service('polls').find(params);
+ }
+
+ setup(app: Application): void {
+ this.app = app;
+ }
+}
+