aboutsummaryrefslogtreecommitdiff
path: root/services/profile/profile.service.ts
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-12 17:00:48 +0300
committereug-vs <eug-vs@keemail.me>2020-06-12 17:00:48 +0300
commitf2573a28748a3c7983b730be2c775e024d0cdaa0 (patch)
tree3498b60c2870e40294c8e1bc62d692e4c12ea633 /services/profile/profile.service.ts
parentfb889145e2e3414925553152e8aff6a096bc0cae (diff)
downloadwhich-api-f2573a28748a3c7983b730be2c775e024d0cdaa0.tar.gz
refactor: move Profiles class to separate file
Diffstat (limited to 'services/profile/profile.service.ts')
-rw-r--r--services/profile/profile.service.ts19
1 files changed, 5 insertions, 14 deletions
diff --git a/services/profile/profile.service.ts b/services/profile/profile.service.ts
index 4a12def..752983c 100644
--- a/services/profile/profile.service.ts
+++ b/services/profile/profile.service.ts
@@ -1,16 +1,7 @@
-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];
- }
-}
+import { Application } from "@feathersjs/express";
+import Profiles from './profile.class';
export default (app: Application): void => {
- app.use('/profile', new ProfileService());
-}; \ No newline at end of file
+ app.use('/profile', new Profiles());
+};
+