This commit is contained in:
Bastian Wagner
2026-02-27 15:11:12 +01:00
parent f1680ae07a
commit 026e47cd1b
3 changed files with 14 additions and 6 deletions

View File

@@ -39,6 +39,11 @@ export class HelperService {
return keys;
}
/**
* Sucht das System eines Schlüssels und gibt es als Promise zurück
* @param key key
* @returns system: KeySystem
*/
async getSystemOfKey(key: Key): Promise<KeySystem> {
const k = await this.keyRepo.findOne({
where: { id: key.id },
@@ -50,7 +55,12 @@ export class HelperService {
return found.system;
}
async getSystemOCylinder(cylinder: Cylinder): Promise<KeySystem> {
/**
* Gibt das System eines Zylinders und gibt es als Promise zurück
* @param cylinder Zylinder
* @returns Promise<KeySystem>
*/
async getSystemOfCylinder(cylinder: Cylinder): Promise<KeySystem> {
const k = await this.cylinderRepository.findOne({
where: { id: cylinder.id },
relations: ['system'],