Include open property on appeals

This commit is contained in:
2023-10-20 12:35:51 -04:00
parent a9f04b99d1
commit 4a62ce5c05
4 changed files with 11 additions and 12 deletions

View File

@ -40,6 +40,8 @@ export async function onRequestPost(context: RequestContext) {
delete appeal.fcm_token;
delete appeal.user.email;
appeal.open = false;
await context.env.DATA.put(`appeal_${appeal.id}`, JSON.stringify(appeal), {
expirationTtl: 94608000,
});

View File

@ -41,6 +41,12 @@ export async function onRequestPost(context: RequestContext) {
delete appeal.user.email;
delete appeal.fcm_token;
appeal.open = false;
await context.env.DATA.put(`appeal_${appeal.id}`, JSON.stringify(appeal), {
expirationTtl: 94608000,
});
await fetch(context.env.APPEALS_WEBHOOK, {
body: JSON.stringify({
embeds: [

View File

@ -82,6 +82,7 @@ export async function onRequestPost(context: RequestContext) {
fcm_token: typeof senderTokenId === "string" ? senderTokenId : undefined,
learned,
id: appealId,
open: true,
reason_for_unban: whyUnban,
user: {
email: currentUser.email,