File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ Router.map(function(){
13
13
var post = Posts . listGlobal ( ) ; ;
14
14
var timelineTitle = "Posts" ;
15
15
var noPostsMessage = "There are no Posts" ;
16
- console . log ( 'QTD followers' ) ;
17
- console . log ( Friendships . followers ( _id ) ) ;
18
16
if ( Session . get ( "timelineToDisplay" ) === "timelineGlobal" ) {
19
17
//the line below is used to format the date time.
20
18
posts = Posts . listGlobal ( ) . map ( function ( value ) { value . date = formatDate ( value . date ) ; return value ; } ) ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Friendships = new Meteor.Collection("friendships");
4
4
* creates a new relation between two users.
5
5
*/
6
6
Friendships . follow = function ( friendId ) {
7
- this . insert ( { userId : this . userId ,
7
+ this . insert ( { userId : Meteor . user ( ) . _id ,
8
8
friendId : friendId
9
9
} ) ;
10
10
} ;
@@ -14,7 +14,7 @@ Friendships.follow = function(friendId){
14
14
*/
15
15
Friendships . unfollow = function ( friendId ) {
16
16
this . remove ( {
17
- userId : this . userId ,
17
+ userId : Meteor . user ( ) . _id ,
18
18
friendId : friendId
19
19
} ) ;
20
20
} ;
@@ -24,7 +24,7 @@ Friendships.unfollow = function(friendId){
24
24
returns the relationship if it exists or undefined otherwise.
25
25
*/
26
26
Friendships . isFollowing = function ( friendId ) {
27
- return this . findOne ( { userId : this . userId ,
27
+ return this . findOne ( { userId : Meteor . user ( ) . _id ,
28
28
friendId : friendId } ) ;
29
29
} ;
30
30
You can’t perform that action at this time.
0 commit comments