first commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// ═══════════════════════════════════════════════════════
|
||||
// SQL Formatter
|
||||
// ═══════════════════════════════════════════════════════
|
||||
async function formatSQL() {
|
||||
const input = document.getElementById('sqlInput').value.trim();
|
||||
if (!input) return setStatus('sqlStatus', 'error', 'Paste some SQL first.');
|
||||
const d = await apiPost('/api/sql/format', { sql: input });
|
||||
if (d.success) { document.getElementById('sqlOutput').value = d.result; setStatus('sqlStatus', 'success', 'Formatted ✓'); }
|
||||
else setStatus('sqlStatus', 'error', d.error);
|
||||
}
|
||||
async function minifySQL() {
|
||||
const input = document.getElementById('sqlInput').value.trim();
|
||||
if (!input) return setStatus('sqlStatus', 'error', 'Paste some SQL first.');
|
||||
const d = await apiPost('/api/sql/minify', { sql: input });
|
||||
if (d.success) { document.getElementById('sqlOutput').value = d.result; setStatus('sqlStatus', 'success', 'Minified ✓'); }
|
||||
else setStatus('sqlStatus', 'error', d.error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user