Enhance security and error handling in various components by refining error catch blocks to ignore specific errors, improving code clarity and consistency across the application.
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 4m10s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 4m10s
This commit is contained in:
@@ -193,11 +193,11 @@ async function save() {
|
||||
const updated = { ...current, seiten: { ...(current.seiten || {}), ttRegeln: html } }
|
||||
try {
|
||||
await $fetch('/api/config', { method: 'PUT', body: updated })
|
||||
try { window.showSuccessModal && window.showSuccessModal('Erfolg', 'Regeln erfolgreich gespeichert!') } catch (_e) {
|
||||
try { window.showSuccessModal && window.showSuccessModal('Erfolg', 'Regeln erfolgreich gespeichert!') } catch {
|
||||
// Modal nicht verfügbar, ignorieren
|
||||
}
|
||||
} catch (error) {
|
||||
try { window.showErrorModal && window.showErrorModal('Fehler', error?.data?.message || 'Speichern fehlgeschlagen') } catch (_e) {
|
||||
try { window.showErrorModal && window.showErrorModal('Fehler', error?.data?.message || 'Speichern fehlgeschlagen') } catch {
|
||||
// Modal nicht verfügbar, ignorieren
|
||||
}
|
||||
}
|
||||
@@ -254,7 +254,7 @@ function insertRuleTemplate(type) {
|
||||
<p class="text-gray-600 text-sm"><strong>Verstoß:</strong> [Was ist der Verstoß?]<br><strong>Strafe:</strong> [Welche Strafe wird verhängt?]<br><strong>Häufigkeit:</strong> [Bei wiederholten Verstößen?]</p>
|
||||
</div>
|
||||
`
|
||||
bgColor = 'bg-green-50'
|
||||
// bgColor = 'bg-green-50' // Nicht verwendet
|
||||
break
|
||||
case 'service':
|
||||
template = `
|
||||
@@ -263,7 +263,7 @@ function insertRuleTemplate(type) {
|
||||
<p class="text-gray-600 text-sm"><strong>Regel:</strong> [Aufschlagregel hier eingeben]<br><strong>Technik:</strong> [Wie muss der Aufschlag ausgeführt werden?]<br><strong>Fehler:</strong> [Was gilt als Fehler?]</p>
|
||||
</div>
|
||||
`
|
||||
bgColor = 'bg-yellow-50'
|
||||
// bgColor = 'bg-yellow-50'
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user