Add forms and validation for domains (#27)

This commit is contained in:
KM Koushik authored and GitHub committed 2024-06-07 21:55:30 +10:00
1 parent 544b5c1a49
commit 6128f26a78
3 files changed
+138 -51

No files matched your search

@@ -7,6 +7,12 @@ import { db } from "~/server/db";
const dnsResolveTxt = util.promisify(dns.resolveTxt);
export async function createDomain(teamId: number, name: string) {
const domainStr = tldts.getDomain(name);
if (!domainStr) {
throw new Error("Invalid domain");
}
const subdomain = tldts.getSubdomain(name);
const publicKey = await ses.addDomain(name);