Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Remove site existence check from addSite function to streamline site creation process

Bill Yang3298b683196f
diff --git a/server/src/api/sites/addSite.ts b/server/src/api/sites/addSite.ts
index 19c01afbd..d9e986d8a 100644
--- a/server/src/api/sites/addSite.ts
+++ b/server/src/api/sites/addSite.ts
@@ -78,17 +78,6 @@ export async function addSite(
});
}
- // Check if site already exists
- const existingSite = await db.query.sites.findFirst({
- where: (sites, { eq }) => eq(sites.domain, domain),
- });
-
- if (existingSite) {
- return reply.status(400).send({
- error: "Site already exists",
- });
- }
-
// Create the new site
const newSite = await db
.insert(sites)