feat(api): expose preview/import/profile/domain endpoints

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-17 15:12:59 +02:00
parent 5693371673
commit 86ff4c141a
8 changed files with 161 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
import type { RequestHandler } from './$types';
import { json, error } from '@sveltejs/kit';
import { getDb } from '$lib/server/db';
import { removeDomain } from '$lib/server/domains/repository';
export const DELETE: RequestHandler = async ({ params }) => {
const id = Number(params.id);
if (!Number.isInteger(id) || id <= 0) error(400, { message: 'Invalid id' });
removeDomain(getDb(), id);
return json({ ok: true });
};