fix: weitere fehlende Umlaute (Hinzufuegen, Eintraege, Passwoerter, erhaelt, enthaelt etc)

This commit is contained in:
christian
2026-05-26 14:58:08 +00:00
parent f8a2d5cb0a
commit 0265b43010
10 changed files with 10 additions and 10 deletions

View File

@@ -15,7 +15,7 @@ router.post('/:kunde_id', upload.single('foto'), async (req, res) => {
const [[k]] = await pool.query('SELECT id FROM kunden WHERE id=? AND tenant_id=?',
[req.params.kunde_id, req.user.tenant_id]);
if (!k) {
// Datei aufraeumen
// Datei aufräumen
try { fs.unlinkSync(req.file.path); } catch {}
return res.status(404).json({ error: 'Kunde nicht gefunden' });
}

View File

@@ -44,7 +44,7 @@ router.post('/', upload.single('foto'), [
if (!errors.isEmpty()) return res.status(400).json({ errors: errors.array() });
const foto_url = req.file ? `/uploads/${req.file.filename}` : null;
try {
// Sicherstellen: kunde_id + artikel_id gehoeren dem Tenant
// Sicherstellen: kunde_id + artikel_id gehören dem Tenant
const [[k]] = await pool.query('SELECT id FROM kunden WHERE id=? AND tenant_id=?',
[req.body.kunde_id, req.user.tenant_id]);
const [[a]] = await pool.query('SELECT id FROM artikel WHERE id=? AND tenant_id=?',

View File

@@ -90,7 +90,7 @@ router.put('/:id', [
});
router.delete('/:id', requireRole(['admin']), async (req, res) => {
if (req.params.id === req.user.id) return res.status(400).json({ error: 'Sie koennen sich nicht selbst löschen' });
if (req.params.id === req.user.id) return res.status(400).json({ error: 'Sie können sich nicht selbst löschen' });
try {
const [r] = await pool.query('DELETE FROM mitarbeiter WHERE id=? AND tenant_id=?',
[req.params.id, req.user.tenant_id]);