Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-stamate committed May 19, 2022
1 parent 6683ee8 commit a831429
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/app/database/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export interface SuccessfulEmail {
}

export interface EmailPreview {
destination: string;
from: string;
to: string;
subject: string;
html: string;
}

Expand Down
14 changes: 10 additions & 4 deletions src/app/service/admin.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Coordinator, EmailEndpointResponse, SuccessfulEmail} from "../database/models";
import {Coordinator, EmailEndpointResponse} from "../database/models";
import {
AcademyMemberModel,
AllowedStudentsModel,
Expand Down Expand Up @@ -114,7 +114,9 @@ export class AdminService {
const emailContent = emailTemplate.replace(new RegExp(/{{activity}}/g), emailActivityContent);

emailEndpointResponse.emailPreview.push({
destination: data.emailTo,
from: from,
to: data.emailTo,
subject: subject,
html: emailContent,
});

Expand Down Expand Up @@ -270,7 +272,9 @@ export class AdminService {
emailContent = emailContent.replace(new RegExp(/{{studentName}}/g), data.studentName);

emailEndpointResponse.emailPreview.push({
destination: data.studentEmail,
from: from,
to: data.studentEmail,
subject: subject,
html: emailContent,
});

Expand Down Expand Up @@ -331,7 +335,9 @@ export class AdminService {
emailContent = emailContent.replace(new RegExp(/{{commission}}/g), commission);

emailEndpointResponse.emailPreview.push({
destination: data.studentEmail,
from: from,
to: data.studentEmail,
subject: subject,
html: emailContent,
});

Expand Down

0 comments on commit a831429

Please sign in to comment.