File tree Expand file tree Collapse file tree
client/app/components/home/courses Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,22 +23,19 @@ export class CoursesComponent implements AfterViewInit {
2323 public userService : UserService ,
2424 private activatedRoute : ActivatedRoute ,
2525 public comService : CommunicationService ,
26- public renderer : Renderer2 ) {
27-
28- }
26+ public renderer : Renderer2 ) { }
2927
3028 ngAfterViewInit ( ) {
3129 this . comService . getColor ( ) . subscribe ( color => {
3230 this . renderer . addClass ( this . backgroundElement . nativeElement , color ) ;
3331 } ) ;
3432
3533 this . activatedRoute . params . subscribe ( ( params : Params ) => {
36- console . log ( params ) ;
37- if ( Object . keys ( params ) [ 0 ] == "me" ) {
34+ if ( params . id == "me" ) {
3835 this . requestCoursesByUser ( ) ;
3936 }
4037 else {
41- this . requestCoursesByCategory ( params . courseId ) ;
38+ this . requestCoursesByCategory ( params . id ) ;
4239 }
4340 } ) ;
4441 }
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ exports.userMeCoursesGET = function (user_id) {
5050 withRelated : [ "course" ]
5151 } )
5252 . then ( ( applications ) => {
53- resolve ( applications . map ( item => item . related ( 'course' ) . toJSON ( ) ) )
53+ resolve ( applications . models ) ;
5454 } )
5555 . catch ( ( error ) => {
5656 reject ( error ) ;
You can’t perform that action at this time.
0 commit comments