mirror of
				https://gitlab.com/comunic/comunicapiv2
				synced 2025-10-31 01:24:43 +00:00 
			
		
		
		
	Simplify method
This commit is contained in:
		| @@ -317,15 +317,10 @@ export class NotificationsHelper { | ||||
| 	 */ | ||||
| 	public static async Delete(n: Notif) { | ||||
| 		// Delete a specific notification | ||||
| 		if(n.hasId) | ||||
| 			await DatabaseHelper.DeleteRows(NOTIFICATIONS_TABLE, { | ||||
| 				id: n.id | ||||
| 			}) | ||||
| 		 | ||||
| 		// Delete wider range of notifications | ||||
| 		else | ||||
| 			await DatabaseHelper.DeleteRows(NOTIFICATIONS_TABLE, this.NotifToDB(n, false)) | ||||
| 		const cond = n.hasId ? {id: n.id} : this.NotifToDB(n, false); | ||||
| 		 | ||||
| 		// Delete notifications | ||||
| 		await DatabaseHelper.DeleteRows(NOTIFICATIONS_TABLE, cond); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user