mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +00:00 
			
		
		
		
	Update read.ts
This commit is contained in:
		
							parent
							
								
									b357afa30a
								
							
						
					
					
						commit
						64b331c5b2
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -11,15 +11,15 @@ export default (
 | 
			
		|||
	noteId: Note['id']
 | 
			
		||||
) => new Promise<any>(async (resolve, reject) => {
 | 
			
		||||
	// Remove document
 | 
			
		||||
	const res = await NoteUnreads.delete({
 | 
			
		||||
	/*const res = */await NoteUnreads.delete({
 | 
			
		||||
		userId: userId,
 | 
			
		||||
		noteId: noteId
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
	// v11 TODO: https://github.com/typeorm/typeorm/issues/2415
 | 
			
		||||
	if (res.affected == 0) {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	//if (res.affected == 0) {
 | 
			
		||||
	//	return;
 | 
			
		||||
	//}
 | 
			
		||||
 | 
			
		||||
	const count1 = await NoteUnreads.count({
 | 
			
		||||
		userId: userId,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue