Don't use metadata for submission data
This commit is contained in:
parent
85dfce6abc
commit
71b7104502
@ -69,19 +69,19 @@ export async function onRequestPost(context: RequestContext) {
|
|||||||
await context.env.DATA.put(
|
await context.env.DATA.put(
|
||||||
`appeal_${appealId}`,
|
`appeal_${appealId}`,
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
createdAt: Date.now(),
|
||||||
learned,
|
learned,
|
||||||
user: currentUser,
|
user: {
|
||||||
|
discriminator: currentUser.discriminator,
|
||||||
|
email: currentUser.email,
|
||||||
|
id: currentUser.id,
|
||||||
|
username: currentUser.username,
|
||||||
|
},
|
||||||
whyBanned,
|
whyBanned,
|
||||||
whyUnban,
|
whyUnban,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
expirationTtl: 94608000,
|
expirationTtl: 94608000,
|
||||||
metadata: {
|
|
||||||
created_at: Date.now(),
|
|
||||||
id: currentUser.id,
|
|
||||||
open: true,
|
|
||||||
tag: `${currentUser.id}#${currentUser.discriminator}`,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -144,6 +144,8 @@ export async function onRequestPost(context: RequestContext) {
|
|||||||
fileExt
|
fileExt
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const { current_user: currentUser } = context.data;
|
||||||
|
|
||||||
await context.env.DATA.put(
|
await context.env.DATA.put(
|
||||||
`reportprocessing_${reportId}`,
|
`reportprocessing_${reportId}`,
|
||||||
context.data.current_user.id,
|
context.data.current_user.id,
|
||||||
@ -155,19 +157,15 @@ export async function onRequestPost(context: RequestContext) {
|
|||||||
attachment: `${fileKey}.${
|
attachment: `${fileKey}.${
|
||||||
["mkv", "mov", "wmv"].includes(fileExt.toLowerCase()) ? "mp4" : fileExt
|
["mkv", "mov", "wmv"].includes(fileExt.toLowerCase()) ? "mp4" : fileExt
|
||||||
}`,
|
}`,
|
||||||
reporter: context.data.current_user,
|
reporter: {
|
||||||
|
discriminator: currentUser.discriminator,
|
||||||
|
email: currentUser.email,
|
||||||
|
id: currentUser.id,
|
||||||
|
username: currentUser.username,
|
||||||
|
},
|
||||||
target_ids: metaIDs,
|
target_ids: metaIDs,
|
||||||
target_usernames: metaNames,
|
target_usernames: metaNames,
|
||||||
}),
|
})
|
||||||
{
|
|
||||||
metadata: {
|
|
||||||
i: context.data.current_user.id,
|
|
||||||
r: metaIDs.toString(),
|
|
||||||
p: true,
|
|
||||||
s: `${context.data.current_user.username}#${context.data.current_user.discriminator}`,
|
|
||||||
u: metaNames.toString(),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return new Response(JSON.stringify({ id: reportId, upload_url: uploadUrl }), {
|
return new Response(JSON.stringify({ id: reportId, upload_url: uploadUrl }), {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user