Skip to content
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

Merged
merged 4 commits into from
Dec 19, 2024
Merged

Conversation

wilwong89
Copy link
Collaborator

@wilwong89 wilwong89 commented Dec 12, 2024

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

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Copy link

github-actions bot commented Dec 12, 2024

Coverage Report (Frontend)

Totals Coverage
Statements: 45.86% ( 3111 / 6783 )
Methods: 35.07% ( 403 / 1149 )
Lines: 53.77% ( 1810 / 3366 )
Branches: 39.59% ( 898 / 2268 )

Copy link

github-actions bot commented Dec 12, 2024

Coverage Report (Application)

Totals Coverage
Statements: 35.86% ( 1064 / 2967 )
Methods: 25.2% ( 128 / 508 )
Lines: 47.5% ( 702 / 1478 )
Branches: 23.85% ( 234 / 981 )

@wilwong89 wilwong89 force-pushed the feature/email-logging branch from 81a035d to afe72b3 Compare December 13, 2024 15:02
@wilwong89 wilwong89 marked this pull request as ready for review December 13, 2024 15:06
@wilwong89 wilwong89 force-pushed the feature/email-logging branch from afe72b3 to eaf2afd Compare December 16, 2024 19:58
to: Array<string>;
};

type Email_data = {
Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to title case

@wilwong89 wilwong89 force-pushed the feature/email-logging branch from eaf2afd to a7fa2b2 Compare December 16, 2024 22:09
@wilwong89 wilwong89 closed this Dec 16, 2024
@wilwong89 wilwong89 reopened this Dec 16, 2024
@wilwong89 wilwong89 force-pushed the feature/email-logging branch from a7fa2b2 to ff16f98 Compare December 18, 2024 18:54
Create email_log table
Create typescript EmailLog types
Create service function for logging
Add log function to email service functions
@wilwong89 wilwong89 force-pushed the feature/email-logging branch from ff16f98 to 07f28d5 Compare December 18, 2024 19:10
// Create public schema tables
knex.schema
.createTable('email_log', (table) => {
table.uuid('email_id').primary();
Copy link
Collaborator

@kyle1morel kyle1morel Dec 18, 2024

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UUID updated.

@@ -1,9 +1,20 @@
import axios from 'axios';
import config from 'config';
import prisma from '../db/dataConnection';
Copy link
Collaborator

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

Copy link
Collaborator Author

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.

@wilwong89 wilwong89 force-pushed the feature/email-logging branch from 30b8463 to 7584cac Compare December 18, 2024 21:33
@kyle1morel kyle1morel merged commit 28b92b8 into master Dec 19, 2024
19 checks passed
@kyle1morel kyle1morel deleted the feature/email-logging branch December 19, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants