refactor: remove snippets feature and n8n project detection
All checks were successful
CI / CD / test-build (push) Successful in 10m12s
CI / CD / deploy-dev (push) Successful in 1m22s
CI / CD / deploy-production (push) Has been skipped

- Remove snippets page, component, API route, Directus types, and setup script
- Remove snippets section from About.tsx (card, modal, state)
- Remove snippets link from 404 page, simplify layout
- Remove n8n Docker event and callback handler workflows (auto project detection)
- Remove Gitea runner setup and deploy scripts
This commit is contained in:
2026-04-09 18:02:21 +02:00
parent 8ff17c552b
commit 7b5fdbd611
13 changed files with 79 additions and 2870 deletions

View File

@@ -937,63 +937,6 @@ export async function getProjectBySlug(
}
}
// Snippets Types
export interface Snippet {
id: string;
title: string;
category: string;
code: string;
description: string;
language: string;
}
/**
* Get Snippets from Directus
*/
export async function getSnippets(limit = 10, featured?: boolean): Promise<Snippet[] | null> {
const filters = ['status: { _eq: "published" }'];
if (featured !== undefined) {
filters.push(`featured: { _eq: ${featured} }`);
}
const filterString = `filter: { _and: [{ ${filters.join(' }, { ')} }] }`;
const query = `
query {
snippets(
${filterString}
limit: ${limit}
) {
id
title
category
code
description
language
}
}
`;
try {
const result = await directusRequest(
'',
{ body: { query } }
);
interface SnippetsResult {
snippets: Snippet[];
}
const snippets = (result as SnippetsResult | null)?.snippets;
if (!snippets || snippets.length === 0) {
return null;
}
return snippets;
} catch (_error) {
console.error('Failed to fetch snippets:', _error);
return null;
}
}
// ─── Hardcover → Directus sync helpers ───────────────────────────────────────
export interface BookReviewCreate {