Skip to content

Commit d9c0a77

Browse files
author
Funasitien DreamCloud
committed
Fix webhook 2
1 parent 91622fe commit d9c0a77

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pages/form.astro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const CAPTCHA_SITE_KEY = import.meta.env.CLOUDFLARE_CAPTCHA_KEY;
140140
<div class="label">
141141
<span class="label-text">Présentation de votre projet</span>
142142
</div>
143-
<textarea class="textarea textarea-bordered h-24" placeholder="DEMOCRAFT est un serveur mini-jeux crossplay..."></textarea>
143+
<textarea id="desciption" class="textarea textarea-bordered h-24" placeholder="DEMOCRAFT est un serveur mini-jeux crossplay..." />
144144
<div class="label">
145145
<span class="label-text-alt">Soyez créatif & précis !</span>
146146
</div>
@@ -251,6 +251,12 @@ const CAPTCHA_SITE_KEY = import.meta.env.CLOUDFLARE_CAPTCHA_KEY;
251251
embeds: [
252252
{
253253
title: "Nouveau formulaire soumis",
254+
description: document.getElementById('desciption').value,
255+
fields: Array.from(formData.entries()).map(([name, value]) => ({
256+
name,
257+
value: value.toString() || 'Non fourni',
258+
inline: true
259+
})),
254260
},
255261
],
256262
};

0 commit comments

Comments
 (0)