Delete FCM token from KV on appeal action
This commit is contained in:
@ -37,6 +37,7 @@ export async function onRequestPost(context: RequestContext) {
|
||||
.bind(context.params.id)
|
||||
.run();
|
||||
|
||||
delete appeal.fcm_token;
|
||||
delete appeal.user.email;
|
||||
|
||||
await context.env.DATA.put(`appeal_${appeal.id}`, JSON.stringify(appeal), {
|
||||
|
@ -38,6 +38,9 @@ export async function onRequestPost(context: RequestContext) {
|
||||
|
||||
const { current_user: currentUser } = context.data;
|
||||
|
||||
delete appeal.user.email;
|
||||
delete appeal.fcm_token;
|
||||
|
||||
await fetch(context.env.APPEALS_WEBHOOK, {
|
||||
body: JSON.stringify({
|
||||
embeds: [
|
||||
|
Reference in New Issue
Block a user