-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create CHES email api logging functionality #216
Conversation
81a035d
to
afe72b3
Compare
afe72b3
to
eaf2afd
Compare
app/src/services/email.ts
Outdated
to: Array<string>; | ||
}; | ||
|
||
type Email_data = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type names should be in title case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to title case
eaf2afd
to
a7fa2b2
Compare
a7fa2b2
to
ff16f98
Compare
Create email_log table Create typescript EmailLog types Create service function for logging Add log function to email service functions
ff16f98
to
07f28d5
Compare
// Create public schema tables | ||
knex.schema | ||
.createTable('email_log', (table) => { | ||
table.uuid('email_id').primary(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PK's should share the name of the table. email_log_id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UUID updated.
app/src/services/email.ts
Outdated
@@ -1,9 +1,20 @@ | |||
import axios from 'axios'; | |||
import config from 'config'; | |||
import prisma from '../db/dataConnection'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1st party import should be separate from 3rd party
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved import down to be separate.
30b8463
to
7584cac
Compare
Description
Log CHES API calls to allow following up sent/unsent emails
Create email_log table
Create typescript EmailLog types
Create service function for logging
Add log function to email service functions
Add unit tests for logging functionality
Types of changes
New feature (non-breaking change which adds functionality)
Checklist
Further comments