remove subject
This commit is contained in:
parent
87242aaea1
commit
7ab199b815
3 changed files with 2 additions and 21 deletions
|
|
@ -15,10 +15,6 @@ export const actions = {
|
|||
return fail(400, { email: null, missing: true });
|
||||
}
|
||||
|
||||
if (!form.has('subject')) {
|
||||
return fail(400, { subject: null, missing: true });
|
||||
}
|
||||
|
||||
if (!form.has('message')) {
|
||||
return fail(400, { message: null, missing: true });
|
||||
}
|
||||
|
|
@ -33,18 +29,13 @@ export const actions = {
|
|||
return fail(400, { email, incorrect: true });
|
||||
}
|
||||
|
||||
const subject = form.get('subject');
|
||||
if (typeof subject !== 'string') {
|
||||
return fail(400, { subject, incorrect: true });
|
||||
}
|
||||
|
||||
const message = form.get('message');
|
||||
if (typeof message !== 'string') {
|
||||
return fail(400, { message, incorrect: true });
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await sendContactMessage(name, email, subject, message);
|
||||
const response = await sendContactMessage(name, email, message);
|
||||
|
||||
return {
|
||||
response: {
|
||||
|
|
|
|||
|
|
@ -57,10 +57,6 @@
|
|||
<Mail />
|
||||
<input required name="email" type="email" class="grow" placeholder="Your Email" />
|
||||
</label>
|
||||
<label class="input input-bordered col-span-full flex w-full items-center gap-2 sm:col-span-1">
|
||||
<Croissant />
|
||||
<input required name="subject" type="text" class="grow" placeholder="Subject" />
|
||||
</label>
|
||||
|
||||
<div class="row-span-3 sm:col-span-2">
|
||||
<textarea
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue