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

0
app/Controllers/Http/AuthController.ts Normal file → Executable file
View File

0
app/Controllers/Http/FileController.ts Normal file → Executable file
View File

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 !'
})
}

0
app/Controllers/Http/GuestBookController.ts Normal file → Executable file
View File

0
app/Controllers/Http/LocationsController.ts Normal file → Executable file
View File

0
app/Controllers/Http/PostsController.ts Normal file → Executable file
View File

0
app/Controllers/Http/ProfileController.ts Normal file → Executable file
View File

0
app/Controllers/Http/ProjectsController.ts Normal file → Executable file
View File

0
app/Controllers/Http/StatesController.ts Normal file → Executable file
View File

0
app/Controllers/Http/SubscribersController.ts Normal file → Executable file
View File

0
app/Controllers/Http/UsersController.ts Normal file → Executable file
View File

0
app/Exceptions/Handler.ts Normal file → Executable file
View File

13
app/Mailers/FormConfirmation.ts Normal file → Executable file
View File

@@ -1,6 +1,4 @@
import mjml from 'mjml'
import { BaseMailer, MessageContract } from '@ioc:Adonis/Addons/Mail'
import View from "@ioc:Adonis/Core/View";
export default class FormConfirmation extends BaseMailer {
@@ -8,16 +6,19 @@ export default class FormConfirmation extends BaseMailer {
super()
}
public html = mjml(View.render('emails/confirmation_form', {
/*public html = mjml(View.render('emails/confirmation_form', {
name: this.name
})).html
})).html*/
public prepare(message: MessageContract) {
message
.from('no-reply@arthurdanjou.fr')
.replyTo('contact@arthurdanjou.fr')
.to(this.email)
.subject('Confirmation Form')
.html(this.html)
.subject('Thank you for contacting !')
.htmlView('emails/confirmation_form', {
name: this.name,
url: 'https://arthurdanjou.fr'
})
}
}

0
app/Middleware/Auth.ts Normal file → Executable file
View File

0
app/Middleware/SilentAuth.ts Normal file → Executable file
View File

0
app/Models/File.ts Normal file → Executable file
View File

0
app/Models/Form.ts Normal file → Executable file
View File

0
app/Models/GuestBookMessage.ts Normal file → Executable file
View File

0
app/Models/Location.ts Normal file → Executable file
View File

0
app/Models/Post.ts Normal file → Executable file
View File

0
app/Models/Project.ts Normal file → Executable file
View File

0
app/Models/Song.ts Normal file → Executable file
View File

0
app/Models/Subscriber.ts Normal file → Executable file
View File

0
app/Models/User.ts Normal file → Executable file
View File

0
app/Tasks/GetDiscordActivity.ts Normal file → Executable file
View File

0
app/Tasks/UpdateGithubReadme.ts Normal file → Executable file
View File

0
app/Validators/AuthValidator.ts Normal file → Executable file
View File

0
app/Validators/FormValidator.ts Normal file → Executable file
View File

0
app/Validators/guestbook/GuestValidator.ts Normal file → Executable file
View File

0
app/Validators/location/LocationValidator.ts Normal file → Executable file
View File

0
app/Validators/project/ProjectValidator.ts Normal file → Executable file
View File

0
app/Validators/subscriber/SubscriberValidator.ts Normal file → Executable file
View File

0
app/Validators/users/UserStoreValidator.ts Normal file → Executable file
View File

0
app/Validators/users/UserUpdateValidator.ts Normal file → Executable file
View File