Schema-Setup-Button + Deploy-Fix-Notiz

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 10:53:04 +02:00
parent a37189ce3c
commit eea8e0518b
2 changed files with 18 additions and 1 deletions

View File

@@ -46,7 +46,8 @@
"mcp__directus__read-fields",
"mcp__directus__create-field",
"mcp__directus__update-field",
"mcp__directus__read-collections"
"mcp__directus__read-collections",
"mcp__directus__create-item"
]
}
}

View File

@@ -315,6 +315,22 @@ export default function GenerateIt() {
{generateError}
</span>
)}
<div style={{ width: 1, height: 24, background: 'var(--border)' }} />
<button
className="btn-ghost btn-sm"
title="Directus-Schema einmalig konfigurieren (M2M-Relationen)"
onClick={async () => {
if (!token) return
const res = await fetch('/api/setup-schema', { method: 'POST', headers: { Authorization: `Bearer ${token}` } })
const d = await res.json()
alert(`Setup: ${d.total} Schritte, ${d.failed} Fehler.\nSiehe Konsole für Details.`)
console.log('[setup-schema]', d)
}}
>
Schema
</button>
</div>
)