aboutsummaryrefslogtreecommitdiff
path: root/services/profile/profile.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'services/profile/profile.service.ts')
-rw-r--r--services/profile/profile.service.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/services/profile/profile.service.ts b/services/profile/profile.service.ts
new file mode 100644
index 0000000..4a12def
--- /dev/null
+++ b/services/profile/profile.service.ts
@@ -0,0 +1,16 @@
+import {User} from '../../models/users/user.schema';
+import {Poll} from "../../models/polls/poll.schema";
+import {Application} from "@feathersjs/express";
+
+export class ProfileService {
+ user: User = Object;
+ saved_polls: Poll[] = [];
+
+ async find () {
+ return [this.user, this.saved_polls];
+ }
+}
+
+export default (app: Application): void => {
+ app.use('/profile', new ProfileService());
+}; \ No newline at end of file