add filter

This commit is contained in:
Vikhyath Mondreti
2026-02-14 14:26:22 -08:00
parent 9584b99c8a
commit d8bbd7eeec

View File

@@ -173,13 +173,13 @@ export async function DELETE(request: NextRequest, context: RouteContext) {
.select({
id: credentialMember.id,
role: credentialMember.role,
status: credentialMember.status,
})
.from(credentialMember)
.where(
and(
eq(credentialMember.credentialId, credentialId),
eq(credentialMember.userId, targetUserId)
eq(credentialMember.userId, targetUserId),
eq(credentialMember.status, 'active')
)
)
.limit(1)