|
|
|
@ -112,6 +112,12 @@ export class Home extends Controller {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async contact(data: Valid<ContactForm>) {
|
|
|
|
|
// If the request has an "e-mail" field, then this was likely filled out by a spam
|
|
|
|
|
// bot, as this field is hidden on the form. So, reject it.
|
|
|
|
|
if ( this.request.input('e-mail') ) {
|
|
|
|
|
data.name = `SPAM: ${data.name}` // for testing, just alter the name
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const submission = make<ContactSubmission>(ContactSubmission)
|
|
|
|
|
submission.name = data.name
|
|
|
|
|
submission.email = data.email
|
|
|
|
|