mirror of
https://github.com/documenso/documenso.git
synced 2026-07-26 09:54:51 +10:00
25 lines
584 B
TypeScript
25 lines
584 B
TypeScript
import { prisma } from '@documenso/prisma';
|
|
|
|
import { adminProcedure } from '../../trpc';
|
|
import {
|
|
ZDeleteEmailTransportRequestSchema,
|
|
ZDeleteEmailTransportResponseSchema,
|
|
} from './delete-email-transport.types';
|
|
|
|
export const deleteEmailTransportRoute = adminProcedure
|
|
.input(ZDeleteEmailTransportRequestSchema)
|
|
.output(ZDeleteEmailTransportResponseSchema)
|
|
.mutation(async ({ input, ctx }) => {
|
|
ctx.logger.info({
|
|
input: {
|
|
id: input.id,
|
|
},
|
|
});
|
|
|
|
await prisma.emailTransport.delete({
|
|
where: {
|
|
id: input.id,
|
|
},
|
|
});
|
|
});
|