fix: weitere fehlende Umlaute (Hinzufuegen, Eintraege, Passwoerter, erhaelt, enthaelt etc)
This commit is contained in:
@@ -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' });
|
||||
}
|
||||
|
||||
@@ -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=?',
|
||||
|
||||
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user