This commit is contained in:
2021-06-30 22:27:07 +02:00
parent b2bed61e82
commit fdc36ff64f
81 changed files with 16 additions and 21 deletions

6
app/Controllers/Http/FormsController.ts Normal file → Executable file
View File

@@ -1,7 +1,7 @@
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
import FormValidator from "App/Validators/FormValidator";
import Form from "App/Models/Form";
//import FormConfirmation from "App/Mailers/FormConfirmation";
import FormConfirmation from "App/Mailers/FormConfirmation";
export default class FormsController {
@@ -10,10 +10,10 @@ export default class FormsController {
await Form.create(data)
//await new FormConfirmation(data.name, data.email).sendLater()
await new FormConfirmation(data.name, data.email).preview()
//todo send confirmation email + email to me
return response.status(200).send({
status: 200
message: 'Form successfully received !'
})
}