mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	Add createdAt property
This commit is contained in:
		
							parent
							
								
									c666a2b26e
								
							
						
					
					
						commit
						76efc03963
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -22,6 +22,7 @@ export default async ({ data }) => {
 | 
			
		|||
		// Decrement following count
 | 
			
		||||
		User.update({ _id: following.followerId }, { $inc: { followingCount: -1 } }),
 | 
			
		||||
		promisedFollower.then(({ followingCount }) => FollowingLog.insert({
 | 
			
		||||
			createdAt: new Date(),
 | 
			
		||||
			userId: following.followerId,
 | 
			
		||||
			count: followingCount - 1
 | 
			
		||||
		})),
 | 
			
		||||
| 
						 | 
				
			
			@ -29,6 +30,7 @@ export default async ({ data }) => {
 | 
			
		|||
		// Decrement followers count
 | 
			
		||||
		User.update({ _id: following.followeeId }, { $inc: { followersCount: -1 } }),
 | 
			
		||||
		promisedFollowee.then(({ followersCount }) => FollowedLog.insert({
 | 
			
		||||
			createdAt: new Date(),
 | 
			
		||||
			userId: following.followeeId,
 | 
			
		||||
			count: followersCount - 1
 | 
			
		||||
		})),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue