diff --git a/functions/api/appeals/[id]/accept.ts b/functions/api/appeals/[id]/accept.ts index a7b5040..8a4a300 100644 --- a/functions/api/appeals/[id]/accept.ts +++ b/functions/api/appeals/[id]/accept.ts @@ -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."); @@ -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", diff --git a/functions/api/appeals/[id]/deny.ts b/functions/api/appeals/[id]/deny.ts index 8e9ef06..cd64d72 100644 --- a/functions/api/appeals/[id]/deny.ts +++ b/functions/api/appeals/[id]/deny.ts @@ -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."); @@ -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",