add features
This commit is contained in:
@@ -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
|
||||
// =========================================================================
|
||||
|
||||
Reference in New Issue
Block a user