1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 19:21:18 -04:00

run prettier over every file

This commit is contained in:
2021-10-31 16:51:19 -04:00
parent f4ebeeb1b8
commit c7fdda36af
16 changed files with 34 additions and 79 deletions

View File

@@ -29,10 +29,9 @@ if (contactForm) {
// https://simonplend.com/how-to-use-fetch-to-post-form-data-as-json-to-your-api/
const formData = Object.fromEntries(new FormData(event.currentTarget).entries());
// some client-side validation, these are all also checked on the server
// to be safe but we can save some unnecessary requests here.
// we throw identical error messages to the server's so they're caught in
// the same way below.
// some client-side validation. these are all also checked on the server to be safe but we can save some
// unnecessary requests here.
// we throw identical error messages to the server's so they're caught in the same way below.
if (!formData.name || !formData.email || !formData.message) {
throw new Error("USER_MISSING_DATA");
}