Schema-Setup-Button + Deploy-Fix-Notiz
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user