Api umgebaut

This commit is contained in:
Bastian Wagner
2026-02-18 13:56:29 +01:00
parent 40e3ac187e
commit dd59a62e96
8 changed files with 78 additions and 63 deletions

View File

@@ -44,6 +44,12 @@ export class CreateKeyComponent {
}
async doSetup() {
this.api.cylinders.subscribe({
next: data => {
this.cylinders = data;
this.createForm.controls.cylinder.patchValue(null);
}
})
await this.loadCylinders();
this.filteredCylinders = this.createForm.controls.cylinder.valueChanges.pipe(
@@ -63,15 +69,7 @@ export class CreateKeyComponent {
}
loadCylinders() {
return new Promise(resolve => {
this.api.getCylinders().subscribe({
next: n => {
this.cylinders = n;
this.createForm.controls.cylinder.patchValue(null);
resolve(null)
}
});
})
return this.api.refreshCylinders();
}