Skip to content

Commit

Permalink
Comment out subpoena revocation message to police
Browse files Browse the repository at this point in the history
  • Loading branch information
unakb committed Jan 9, 2025
1 parent 1aa26d4 commit de60280
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions apps/judicial-system/backend/src/app/modules/case/case.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1095,20 +1095,21 @@ export class CaseService {
})
}

const subpoenasToRevoke = await this.subpoenaService.findByCaseId(
theCase.id,
)

if (subpoenasToRevoke?.length > 0) {
messages.push(
...subpoenasToRevoke.map((subpoena) => ({
type: MessageType.DELIVERY_TO_POLICE_SUBPOENA_REVOCATION,
user,
caseId: theCase.id,
elementId: [subpoena.defendantId, subpoena.id],
})),
)
}
// Commented out temporarily because police endpoint is not ready to receive revocation
// const subpoenasToRevoke = await this.subpoenaService.findByCaseId(
// theCase.id,
// )

// if (subpoenasToRevoke?.length > 0) {
// messages.push(
// ...subpoenasToRevoke.map((subpoena) => ({
// type: MessageType.DELIVERY_TO_POLICE_SUBPOENA_REVOCATION,
// user,
// caseId: theCase.id,
// elementId: [subpoena.defendantId, subpoena.id],
// })),
// )
// }

return this.messageService.sendMessagesToQueue(messages)
}
Expand Down

0 comments on commit de60280

Please sign in to comment.