Remove unused publicProcedure from testRouter and clean up mailer imports
This commit is contained in:
parent
7207e9ffd0
commit
f7553e827d
2 changed files with 2 additions and 19 deletions
|
|
@ -1,26 +1,9 @@
|
||||||
import {
|
import { createTRPCRouter, protectedApiProcedure } from "~/server/api/trpc";
|
||||||
createTRPCRouter,
|
|
||||||
protectedApiProcedure,
|
|
||||||
publicProcedure,
|
|
||||||
} from "~/server/api/trpc";
|
|
||||||
import { genMail, NewMail } from "~/server/services/mailer";
|
|
||||||
|
|
||||||
export const testRouter = createTRPCRouter({
|
export const testRouter = createTRPCRouter({
|
||||||
testApi: protectedApiProcedure.query(async () => {
|
testApi: protectedApiProcedure.query(async () => {
|
||||||
return "Hello World!";
|
return "Hello World!";
|
||||||
}),
|
}),
|
||||||
testMail: publicProcedure.query(async ({ ctx }) => {
|
|
||||||
const mail = await NewMail({
|
|
||||||
to: "m.pedone98@gmail.com",
|
|
||||||
subject: "Test Email",
|
|
||||||
|
|
||||||
mailType: "pwResetLink",
|
|
||||||
props: {
|
|
||||||
resetlink: "https://example.com/reset-password",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
return mail;
|
|
||||||
}),
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PROTECTED API CALL EXAMPLE
|
PROTECTED API CALL EXAMPLE
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import type { Recesso_NewMail } from "emails/recesso";
|
||||||
import Recesso from "emails/recesso";
|
import Recesso from "emails/recesso";
|
||||||
import type { RegistrazioneAvvenuta_NewMail } from "emails/registrazione-avvenuta";
|
import type { RegistrazioneAvvenuta_NewMail } from "emails/registrazione-avvenuta";
|
||||||
import RegistrazioneAvvenuta from "emails/registrazione-avvenuta";
|
import RegistrazioneAvvenuta from "emails/registrazione-avvenuta";
|
||||||
import { createTransport, type TransportOptions } from "nodemailer";
|
import { createTransport } from "nodemailer";
|
||||||
import { htmlToText } from "nodemailer-html-to-text";
|
import { htmlToText } from "nodemailer-html-to-text";
|
||||||
import { env } from "~/env.mjs";
|
import { env } from "~/env.mjs";
|
||||||
import type { JSX } from "react";
|
import type { JSX } from "react";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue