aboutsummaryrefslogtreecommitdiff
path: root/services/profile/profile.service.ts
blob: 4a12def8002b86bac5a41dc54864df29a61907b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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());
};