@@ -2,20 +2,22 @@ import {inject} from 'aurelia-framework';
2
2
import { AuthService } from 'aurelia-authentication' ;
3
3
import { NotificationService } from 'aurelia-notify' ;
4
4
import { DataListController } from 'resources/features/data-list/controller' ;
5
+ import { LoggedInUser } from 'resources/entities/logged-in-user' ;
5
6
import { NewsService } from '../../services/news/news-service' ;
6
7
import { NewsCommentsService } from '../../services/news/news-comments-service' ;
7
8
8
9
const ENTER_KEY = 13 ;
9
10
10
- @inject ( NewsService , NewsCommentsService , AuthService , NotificationService )
11
+ @inject ( NewsService , NewsCommentsService , AuthService , NotificationService , LoggedInUser )
11
12
export class View {
12
13
comments = [ ] ;
13
14
14
- constructor ( newsService , newsCommentsService , authService , notificationService ) {
15
+ constructor ( newsService , newsCommentsService , authService , notificationService , loggedInUser ) {
15
16
this . newsService = newsService ;
16
17
this . newsCommentsService = newsCommentsService ;
17
18
this . authService = authService ;
18
19
this . notificationService = notificationService ;
20
+ this . loggedInUser = loggedInUser ;
19
21
20
22
this . dataListController = new DataListController ( options => this . loadMore ( options ) ) ;
21
23
}
@@ -74,8 +76,4 @@ export class View {
74
76
loadMore ( page ) {
75
77
return this . newsCommentsService . getAll ( this . newsId , page ) ;
76
78
}
77
-
78
- get isAuthenticated ( ) {
79
- return this . authService . isAuthenticated ( ) ;
80
- }
81
79
}
0 commit comments