Include open property on appeals
This commit is contained in:
parent
a9f04b99d1
commit
4a62ce5c05
@ -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,
|
||||
});
|
||||
|
@ -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: [
|
||||
|
@ -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,
|
||||
|
14
index.d.ts
vendored
14
index.d.ts
vendored
@ -5,28 +5,18 @@ declare global {
|
||||
ASSETS: Fetcher;
|
||||
D1: D1Database;
|
||||
DATA: KVNamespace;
|
||||
|
||||
[k: string]: string;
|
||||
}
|
||||
|
||||
type RequestContext = EventContext<Env, string, { [k: string]: any }>;
|
||||
|
||||
interface EmotionCriticalToChunks {
|
||||
html: string;
|
||||
styles: { key: string; ids: string[]; css: string }[];
|
||||
}
|
||||
|
||||
interface EmotionServer {
|
||||
constructStyleTagsFromChunks: (
|
||||
criticalData: EmotionCriticalToChunks,
|
||||
) => string;
|
||||
extractCriticalToChunks: (html: string) => EmotionCriticalToChunks;
|
||||
}
|
||||
|
||||
interface AppealCardProps {
|
||||
ban_reason: string;
|
||||
created_at: number;
|
||||
id: string;
|
||||
learned: string;
|
||||
open?: boolean;
|
||||
reason_for_unban: string;
|
||||
user: {
|
||||
id: string;
|
||||
|
Loading…
x
Reference in New Issue
Block a user