Skip to content

Commit

Permalink
feat: email function reveal
Browse files Browse the repository at this point in the history
  • Loading branch information
lopahn2 committed Nov 20, 2023
1 parent c5396d5 commit e45fde7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 31 deletions.
48 changes: 24 additions & 24 deletions lib/funcs.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ export const contractPdfController = async (html, fileName, email) => {
.then(async (data) => {
s3Url = data.Location;

// await emailCon.sendMail({
// from: `"The Dreaming, Suite" <${process.env.GMAIL_ID}>`,
// to: email,
// subject: "The Dreaming, Suite 당신의 순간을 응원합니다. [ 계약서 ]",
// text: "진심을 보증합니다, 당신이 찾는 그 곳. SUITE",
// attachments: [
// {
// filename: "SUITE-Contract.pdf", // Name of the PDF file as it will appear in the email
// content: PDF,
// },
// ],
// });
await emailCon.sendMail({
from: `"The Dreaming, Suite" <${process.env.GMAIL_ID}>`,
to: email,
subject: "The Dreaming, Suite 당신의 순간을 응원합니다. [ 계약서 ]",
text: "진심을 보증합니다, 당신이 찾는 그 곳. SUITE",
attachments: [
{
filename: "SUITE-Contract.pdf", // Name of the PDF file as it will appear in the email
content: PDF,
},
],
});
})
.catch((e) => {
console.error(e);
Expand Down Expand Up @@ -116,18 +116,18 @@ export const certificatedPdfController = async (html, fileName, email) => {
.then(async (data) => {
s3Url = data.Location;

// await emailCon.sendMail({
// from: `"The Dreaming, Suite" <${process.env.GMAIL_ID}>`,
// to: email,
// subject: "The Dreaming, Suite 당신의 순간을 응원합니다. [ 수료증 ]",
// text: "진심을 보증합니다, 당신이 찾는 그 곳. SUITE",
// attachments: [
// {
// filename: "SUITE-Certificated.pdf", // Name of the PDF file as it will appear in the email
// content: PDF,
// },
// ],
// });
await emailCon.sendMail({
from: `"The Dreaming, Suite" <${process.env.GMAIL_ID}>`,
to: email,
subject: "The Dreaming, Suite 당신의 순간을 응원합니다. [ 수료증 ]",
text: "진심을 보증합니다, 당신이 찾는 그 곳. SUITE",
attachments: [
{
filename: "SUITE-Certificated.pdf", // Name of the PDF file as it will appear in the email
content: PDF,
},
],
});
})
.catch((e) => {
console.error(e);
Expand Down
9 changes: 2 additions & 7 deletions service/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ export const start = async (req, res) => {
finishDate,
body.minimum_attendance,
body.minimum_mission_completion,
// sentTx.hash
"0xa2aa29bbc08e36b9d382510a35d07fca40f684b963740949051bf3d01aff78b5"
sentTx.hash
);

const fileName = `contract/${body.suite_room_id}-${memberName}.pdf`;
Expand All @@ -189,11 +188,7 @@ export const start = async (req, res) => {
body.suite_room_id,
memberIdList[idx],
memberName,
// sentTx.hash.slice(0, 12),
"0xa2aa29bbc08e36b9d382510a35d07fca40f684b963740949051bf3d01aff78b5".slice(
0,
12
),
sentTx.hash.slice(0, 12),
s3Url,
"CONTRACT",
nowTime,
Expand Down

0 comments on commit e45fde7

Please sign in to comment.