From 8e860a1ea39f3f8b03454102bf35291ff379d9cb Mon Sep 17 00:00:00 2001 From: m5r Date: Sat, 30 Oct 2021 13:04:54 +0200 Subject: [PATCH] move tailwind.css to templates directory --- app/auth/mutations/signup.ts | 7 +++++-- mailers/renderer.ts | 2 +- mailers/{ => templates}/tailwind.css | 0 3 files changed, 6 insertions(+), 3 deletions(-) rename mailers/{ => templates}/tailwind.css (100%) diff --git a/app/auth/mutations/signup.ts b/app/auth/mutations/signup.ts index 11a3f8e..cde97df 100644 --- a/app/auth/mutations/signup.ts +++ b/app/auth/mutations/signup.ts @@ -1,8 +1,8 @@ import { resolver, SecurePassword } from "blitz"; -import db, { GlobalRole, MembershipRole } from "../../../db"; +import db, { GlobalRole, MembershipRole } from "db"; import { Signup } from "../validations"; -import { computeEncryptionKey } from "../../../db/_encryption"; +import { computeEncryptionKey } from "db/_encryption"; export default resolver.pipe(resolver.zod(Signup), async ({ email, password, fullName }, ctx) => { const hashedPassword = await SecurePassword.hash(password.trim()); @@ -33,5 +33,8 @@ export default resolver.pipe(resolver.zod(Signup), async ({ email, password, ful orgId: user.memberships[0]!.organizationId, shouldShowWelcomeMessage: true, }); + + // TODO: send welcome email + return user; }); diff --git a/mailers/renderer.ts b/mailers/renderer.ts index 16403fa..ba03310 100644 --- a/mailers/renderer.ts +++ b/mailers/renderer.ts @@ -21,7 +21,7 @@ function getMaizzleParams(templateName: string, locals: Record) const template = fs .readFileSync(path.resolve(process.cwd(), "./mailers/templates", `${templateName}.html`)) .toString(); - const tailwindCss = fs.readFileSync(path.resolve(process.cwd(), "./mailers/tailwind.css")).toString(); + const tailwindCss = fs.readFileSync(path.resolve(process.cwd(), "./mailers/templates/tailwind.css")).toString(); const options = { tailwind: { diff --git a/mailers/tailwind.css b/mailers/templates/tailwind.css similarity index 100% rename from mailers/tailwind.css rename to mailers/templates/tailwind.css