add features

This commit is contained in:
Matthias Hochmeister
2026-03-03 17:01:53 +01:00
parent 92b05726d4
commit 5a6fc85a75
30 changed files with 1104 additions and 198 deletions

View File

@@ -118,6 +118,19 @@ class EquipmentService {
}
}
async getCategoryById(id: string): Promise<AusruestungKategorie | null> {
try {
const result = await pool.query(
`SELECT * FROM ausruestung_kategorien WHERE id = $1`,
[id]
);
return result.rows.length > 0 ? (result.rows[0] as AusruestungKategorie) : null;
} catch (error) {
logger.error('EquipmentService.getCategoryById failed', { error, id });
throw new Error('Failed to fetch equipment category');
}
}
// =========================================================================
// CRUD
// =========================================================================