feat: complete i18n support, telegram webhook, and security improvements

This commit is contained in:
AyrisAI
2026-05-14 13:46:17 +03:00
parent 4c9a07e3ef
commit cc65a2bd72
23 changed files with 798 additions and 205 deletions

View File

@@ -30,5 +30,13 @@ export async function POST(req: NextRequest) {
if (!domain) return NextResponse.json({ error: "domain gerekli" }, { status: 400 });
const result = await createDomain({ domain, description, mailboxes, quota, maxquota });
if (result.ok && Array.isArray(result.data)) {
const hasError = result.data.some((item: any) => item.type === "error");
if (hasError) {
return NextResponse.json(result.data, { status: 400 });
}
}
return NextResponse.json(result.data, { status: result.ok ? 200 : 502 });
}