diff --git a/.adonisrc.json b/.adonisrc.json old mode 100644 new mode 100755 diff --git a/.dockerignore b/.dockerignore old mode 100644 new mode 100755 diff --git a/.editorconfig b/.editorconfig old mode 100644 new mode 100755 diff --git a/.env.example b/.env.example old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/ace b/ace old mode 100644 new mode 100755 diff --git a/ace-manifest.json b/ace-manifest.json old mode 100644 new mode 100755 diff --git a/app/Controllers/Http/AuthController.ts b/app/Controllers/Http/AuthController.ts old mode 100644 new mode 100755 diff --git a/app/Controllers/Http/FileController.ts b/app/Controllers/Http/FileController.ts old mode 100644 new mode 100755 diff --git a/app/Controllers/Http/FormsController.ts b/app/Controllers/Http/FormsController.ts old mode 100644 new mode 100755 index c6424bd..711b19e --- a/app/Controllers/Http/FormsController.ts +++ b/app/Controllers/Http/FormsController.ts @@ -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 !' }) } diff --git a/app/Controllers/Http/GuestBookController.ts b/app/Controllers/Http/GuestBookController.ts old mode 100644 new mode 100755 diff --git a/app/Controllers/Http/LocationsController.ts b/app/Controllers/Http/LocationsController.ts old mode 100644 new mode 100755 diff --git a/app/Controllers/Http/PostsController.ts b/app/Controllers/Http/PostsController.ts old mode 100644 new mode 100755 diff --git a/app/Controllers/Http/ProfileController.ts b/app/Controllers/Http/ProfileController.ts old mode 100644 new mode 100755 diff --git a/app/Controllers/Http/ProjectsController.ts b/app/Controllers/Http/ProjectsController.ts old mode 100644 new mode 100755 diff --git a/app/Controllers/Http/StatesController.ts b/app/Controllers/Http/StatesController.ts old mode 100644 new mode 100755 diff --git a/app/Controllers/Http/SubscribersController.ts b/app/Controllers/Http/SubscribersController.ts old mode 100644 new mode 100755 diff --git a/app/Controllers/Http/UsersController.ts b/app/Controllers/Http/UsersController.ts old mode 100644 new mode 100755 diff --git a/app/Exceptions/Handler.ts b/app/Exceptions/Handler.ts old mode 100644 new mode 100755 diff --git a/app/Mailers/FormConfirmation.ts b/app/Mailers/FormConfirmation.ts old mode 100644 new mode 100755 index 235c3af..537fc17 --- a/app/Mailers/FormConfirmation.ts +++ b/app/Mailers/FormConfirmation.ts @@ -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' + }) } } diff --git a/app/Middleware/Auth.ts b/app/Middleware/Auth.ts old mode 100644 new mode 100755 diff --git a/app/Middleware/SilentAuth.ts b/app/Middleware/SilentAuth.ts old mode 100644 new mode 100755 diff --git a/app/Models/File.ts b/app/Models/File.ts old mode 100644 new mode 100755 diff --git a/app/Models/Form.ts b/app/Models/Form.ts old mode 100644 new mode 100755 diff --git a/app/Models/GuestBookMessage.ts b/app/Models/GuestBookMessage.ts old mode 100644 new mode 100755 diff --git a/app/Models/Location.ts b/app/Models/Location.ts old mode 100644 new mode 100755 diff --git a/app/Models/Post.ts b/app/Models/Post.ts old mode 100644 new mode 100755 diff --git a/app/Models/Project.ts b/app/Models/Project.ts old mode 100644 new mode 100755 diff --git a/app/Models/Song.ts b/app/Models/Song.ts old mode 100644 new mode 100755 diff --git a/app/Models/Subscriber.ts b/app/Models/Subscriber.ts old mode 100644 new mode 100755 diff --git a/app/Models/User.ts b/app/Models/User.ts old mode 100644 new mode 100755 diff --git a/app/Tasks/GetDiscordActivity.ts b/app/Tasks/GetDiscordActivity.ts old mode 100644 new mode 100755 diff --git a/app/Tasks/UpdateGithubReadme.ts b/app/Tasks/UpdateGithubReadme.ts old mode 100644 new mode 100755 diff --git a/app/Validators/AuthValidator.ts b/app/Validators/AuthValidator.ts old mode 100644 new mode 100755 diff --git a/app/Validators/FormValidator.ts b/app/Validators/FormValidator.ts old mode 100644 new mode 100755 diff --git a/app/Validators/guestbook/GuestValidator.ts b/app/Validators/guestbook/GuestValidator.ts old mode 100644 new mode 100755 diff --git a/app/Validators/location/LocationValidator.ts b/app/Validators/location/LocationValidator.ts old mode 100644 new mode 100755 diff --git a/app/Validators/project/ProjectValidator.ts b/app/Validators/project/ProjectValidator.ts old mode 100644 new mode 100755 diff --git a/app/Validators/subscriber/SubscriberValidator.ts b/app/Validators/subscriber/SubscriberValidator.ts old mode 100644 new mode 100755 diff --git a/app/Validators/users/UserStoreValidator.ts b/app/Validators/users/UserStoreValidator.ts old mode 100644 new mode 100755 diff --git a/app/Validators/users/UserUpdateValidator.ts b/app/Validators/users/UserUpdateValidator.ts old mode 100644 new mode 100755 diff --git a/commands/index.ts b/commands/index.ts old mode 100644 new mode 100755 diff --git a/config/ally.ts b/config/ally.ts old mode 100644 new mode 100755 diff --git a/config/app.ts b/config/app.ts old mode 100644 new mode 100755 diff --git a/config/auth.ts b/config/auth.ts old mode 100644 new mode 100755 diff --git a/config/bodyparser.ts b/config/bodyparser.ts old mode 100644 new mode 100755 diff --git a/config/cors.ts b/config/cors.ts old mode 100644 new mode 100755 diff --git a/config/database.ts b/config/database.ts old mode 100644 new mode 100755 diff --git a/config/hash.ts b/config/hash.ts old mode 100644 new mode 100755 diff --git a/config/mail.ts b/config/mail.ts old mode 100644 new mode 100755 diff --git a/config/redis.ts b/config/redis.ts old mode 100644 new mode 100755 diff --git a/config/session.ts b/config/session.ts old mode 100644 new mode 100755 diff --git a/contracts/ally.ts b/contracts/ally.ts old mode 100644 new mode 100755 diff --git a/contracts/auth.ts b/contracts/auth.ts old mode 100644 new mode 100755 diff --git a/contracts/env.ts b/contracts/env.ts old mode 100644 new mode 100755 diff --git a/contracts/events.ts b/contracts/events.ts old mode 100644 new mode 100755 diff --git a/contracts/hash.ts b/contracts/hash.ts old mode 100644 new mode 100755 diff --git a/contracts/mail.ts b/contracts/mail.ts old mode 100644 new mode 100755 diff --git a/contracts/redis.ts b/contracts/redis.ts old mode 100644 new mode 100755 diff --git a/database/factories/index.ts b/database/factories/index.ts old mode 100644 new mode 100755 diff --git a/database/migrations/1603020084373_subscribers.ts b/database/migrations/1603020084373_subscribers.ts old mode 100644 new mode 100755 diff --git a/database/migrations/1605956543449_files.ts b/database/migrations/1605956543449_files.ts old mode 100644 new mode 100755 diff --git a/database/migrations/1605956711010_posts.ts b/database/migrations/1605956711010_posts.ts old mode 100644 new mode 100755 diff --git a/database/migrations/1608409476823_locations.ts b/database/migrations/1608409476823_locations.ts old mode 100644 new mode 100755 diff --git a/database/migrations/1608415261417_projects.ts b/database/migrations/1608415261417_projects.ts old mode 100644 new mode 100755 diff --git a/database/migrations/1618661863952_forms.ts b/database/migrations/1618661863952_forms.ts old mode 100644 new mode 100755 diff --git a/database/migrations/1621542488791_golden_messages.ts b/database/migrations/1621542488791_golden_messages.ts old mode 100644 new mode 100755 diff --git a/database/migrations/1625078903131_users.ts b/database/migrations/1625078903131_users.ts old mode 100644 new mode 100755 diff --git a/database/migrations/1625078908619_api_tokens.ts b/database/migrations/1625078908619_api_tokens.ts old mode 100644 new mode 100755 diff --git a/env.ts b/env.ts old mode 100644 new mode 100755 diff --git a/package.json b/package.json old mode 100644 new mode 100755 index fe3c3f6..b715ca9 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@adonisjs/view": "^6.0.3", "axios": "^0.21.1", "luxon": "^1.27.0", - "mjml": "^4.10.0", + "mjml": "^4.10.1", "mysql": "^2.18.1", "phc-argon2": "^1.1.1", "proxy-addr": "^2.0.7", diff --git a/providers/AppProvider.ts b/providers/AppProvider.ts old mode 100644 new mode 100755 diff --git a/resources/views/emails/confirmation_form.edge b/resources/views/emails/confirmation_form.edge old mode 100644 new mode 100755 index bd8f091..d001d1d --- a/resources/views/emails/confirmation_form.edge +++ b/resources/views/emails/confirmation_form.edge @@ -1,10 +1,4 @@ - - - - - - Hello World - - - - +

Welcome {{ name }}

+

+ Click here to verify your email address. +

diff --git a/server.ts b/server.ts old mode 100644 new mode 100755 diff --git a/start/kernel.ts b/start/kernel.ts old mode 100644 new mode 100755 diff --git a/start/routes.ts b/start/routes.ts old mode 100644 new mode 100755 diff --git a/tsconfig.json b/tsconfig.json old mode 100644 new mode 100755 diff --git a/yarn.lock b/yarn.lock old mode 100644 new mode 100755 index 7180aa2..da42bef --- a/yarn.lock +++ b/yarn.lock @@ -3272,7 +3272,7 @@ mjml-wrapper@4.10.1: mjml-core "4.10.1" mjml-section "4.10.1" -mjml@^4.10.0: +mjml@^4.10.1: version "4.10.1" resolved "https://registry.yarnpkg.com/mjml/-/mjml-4.10.1.tgz#8f5d06815bee01ef033553c73589451704a63e8a" integrity sha512-cD6F20yIMOUT9xaAVWLfk0DnhQSq6VkpD+LCf/RUWrxsxxkwPJtJfKfrP5TMeuWcmDFS9hfOBS3Jz+NmGh03jQ==