mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
Update to v5
This commit is contained in:
@@ -1,6 +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";
|
||||
|
||||
export default class FormsController {
|
||||
|
||||
@@ -8,6 +9,8 @@ export default class FormsController {
|
||||
const data = await request.validate(FormValidator)
|
||||
|
||||
await Form.create(data)
|
||||
|
||||
await new FormConfirmation(data.name, data.email).sendLater()
|
||||
//todo send confirmation email + email to me
|
||||
return response.status(200).send({
|
||||
status: 200
|
||||
|
||||
Reference in New Issue
Block a user