Skip to content

Commit

Permalink
chore(migration.sql): update migration to delete only listItem audits…
Browse files Browse the repository at this point in the history
… with auditEvent set to 'REMINDER'

refactor(listItemEvent.ts): remove unnecessary check for "id" in response
  • Loading branch information
RichardBray committed Aug 16, 2023
1 parent 3097a16 commit 2068e78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-- Delete all lstItem audit events.
DELETE FROM "Audit"
WHERE type = 'listItem';
WHERE type = 'listItem' AND "auditEvent" = 'REMINDER';
6 changes: 2 additions & 4 deletions src/shared/listItemEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,10 @@ export const EVENTS = {
}),

[ListItemEvent.REMINDER]: (
response: SendEmailResponse | {},
response: SendEmailResponse,
notes?: string[],
reference?: string
): EventCreate<"REMINDER"> | undefined => {
if (!("id" in response)) return;

): EventCreate<"REMINDER"> => {
const notifyResponseWithoutContent = {
id: response.id,
template: response.template,
Expand Down

0 comments on commit 2068e78

Please sign in to comment.