Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix email sending not working
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent eb550a7 commit 056c6b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions functions/api/appeals/[id]/accept.ts
Expand Up @@ -2,7 +2,7 @@ export async function onRequestPost(context: RequestContext) {
const { appeal } = context.data;
const body = new FormData();
body.append("from", "noreply@mail.carcrushers.cc");
body.append("to", appeal.email);
body.append("to", appeal.user.email);
body.append("subject", "Appeal Accepted");
body.append("template", "appeal_accepted");
body.append("v:note", context.data.body.feedback || "No note provided.");
Expand Down Expand Up @@ -51,7 +51,7 @@ export async function onRequestPost(context: RequestContext) {
{
title: "Appeal Accepted",
color: 0x00ff00,
description: `Appeal from user ${appeal.username} (${appeal.id}) was accepted.`,
description: `Appeal from user ${appeal.user.username} (${appeal.user.id}) was accepted.`,
fields: [
{
name: "Moderator",
Expand Down
4 changes: 2 additions & 2 deletions functions/api/appeals/[id]/deny.ts
Expand Up @@ -2,7 +2,7 @@ export async function onRequestPost(context: RequestContext) {
const { appeal } = context.data;
const body = new FormData();
body.append("from", "noreply@mail.carcrushers.cc");
body.append("to", appeal.email);
body.append("to", appeal.user.email);
body.append("subject", "Appeal Denied");
body.append("template", "appeal_denied");
body.append("v:note", context.data.body.feedback || "No note provided.");
Expand Down Expand Up @@ -40,7 +40,7 @@ export async function onRequestPost(context: RequestContext) {
{
title: "Appeal Denied",
color: 0xff0000,
description: `Appeal from user ${appeal.username} (${appeal.id}) was denied.`,
description: `Appeal from user ${appeal.user.username} (${appeal.user.id}) was denied.`,
fields: [
{
name: "Moderator",
Expand Down

0 comments on commit 056c6b8

Please sign in to comment.