(userId: string, type: string, referenceId: string)
| 136 | } |
| 137 | |
| 138 | async exists(userId: string, type: string, referenceId: string): Promise<boolean> { |
| 139 | const result = await query( |
| 140 | `SELECT 1 FROM notifications WHERE recipient_user_id = $1 AND type = $2 AND reference_id = $3 LIMIT 1`, |
| 141 | [userId, type, referenceId] |
| 142 | ); |
| 143 | return result.rows.length > 0; |
| 144 | } |
| 145 | } |
no test coverage detected