Improve Self host setup (#30)
* Add self host setup * Improve blunders * Move to bull mq * More changes * Add example code for sending test emails
This commit is contained in:
@@ -3,12 +3,24 @@ import { env } from "~/env";
|
||||
|
||||
import { createTRPCRouter, adminProcedure } from "~/server/api/trpc";
|
||||
import { SesSettingsService } from "~/server/service/ses-settings-service";
|
||||
import { getAccount } from "~/server/aws/ses";
|
||||
|
||||
export const adminRouter = createTRPCRouter({
|
||||
getSesSettings: adminProcedure.query(async () => {
|
||||
return SesSettingsService.getAllSettings();
|
||||
}),
|
||||
|
||||
getQuotaForRegion: adminProcedure
|
||||
.input(
|
||||
z.object({
|
||||
region: z.string(),
|
||||
})
|
||||
)
|
||||
.query(async ({ input }) => {
|
||||
const acc = await getAccount(input.region);
|
||||
return acc.SendQuota?.MaxSendRate;
|
||||
}),
|
||||
|
||||
addSesSettings: adminProcedure
|
||||
.input(
|
||||
z.object({
|
||||
|
Reference in New Issue
Block a user