File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { Application } from '@feathersjs/express' ;
2
2
import Users from './users/users.service' ;
3
3
import Polls from './polls/polls.service' ;
4
+ import Profile from './profile/profile.service' ;
4
5
5
6
export default ( app : Application ) : void => {
6
7
app . configure ( Users ) ;
7
8
app . configure ( Polls ) ;
9
+ app . configure ( Profile ) ;
8
10
} ;
9
11
Original file line number Diff line number Diff line change
1
+ import { User } from '../../models/users/user.schema' ;
2
+ import { Poll } from "../../models/polls/poll.schema" ;
3
+ import { Application } from "@feathersjs/express" ;
4
+
5
+ export class ProfileService {
6
+ user : User = Object ;
7
+ saved_polls : Poll [ ] = [ ] ;
8
+
9
+ async find ( ) {
10
+ return [ this . user , this . saved_polls ] ;
11
+ }
12
+ }
13
+
14
+ export default ( app : Application ) : void => {
15
+ app . use ( '/profile' , new ProfileService ( ) ) ;
16
+ } ;
You can’t perform that action at this time.
0 commit comments