File tree Expand file tree Collapse file tree 5 files changed +23
-10
lines changed Expand file tree Collapse file tree 5 files changed +23
-10
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
+ import Profiles from './profiles/profiles .service' ;
5
5
6
6
export default ( app : Application ) : void => {
7
7
app . configure ( Users ) ;
8
8
app . configure ( Polls ) ;
9
- app . configure ( Profile ) ;
9
+ app . configure ( Profiles ) ;
10
10
} ;
11
11
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import PollModel from '../../models/polls/poll.model';
3
3
4
4
export default class Profiles {
5
5
async get ( id : string , params : any ) : Promise < PollSchema [ ] > {
6
- return PollModel . find ( { authorId : id } ) ;
6
+ return PollModel . find ( { authorId : id } ) . lean < Poll > ( ) ;
7
7
}
8
8
} ;
9
9
Original file line number Diff line number Diff line change
1
+ import {
2
+ expandAuthorManyHook ,
3
+ } from '../../hooks/expandAuthor' ;
4
+
5
+ export default {
6
+ after : {
7
+ get : [ expandAuthorManyHook ] ,
8
+ }
9
+ } ;
10
+
Original file line number Diff line number Diff line change
1
+ import { Application } from "@feathersjs/express" ;
2
+ import Profiles from './profiles.class' ;
3
+
4
+ import hooks from './profiles.hooks' ;
5
+
6
+ export default ( app : Application ) : void => {
7
+ app . use ( '/profiles' , new Profiles ( ) ) ;
8
+ app . service ( 'profiles' ) . hooks ( hooks ) ;
9
+ } ;
10
+
You can’t perform that action at this time.
0 commit comments