Logging und sowas

This commit is contained in:
Bastian Wagner
2026-02-20 10:28:48 +01:00
parent 29bfffc505
commit 4e051a1f40
14 changed files with 87 additions and 22 deletions

View File

@@ -92,6 +92,24 @@ export class ApiService {
})
}
updateSystem(cylinder: any): Promise<boolean> {
return new Promise<boolean>(resolve => {
this.http.put('api/system', cylinder).pipe(
this.toast.observe({
loading: `Schließanlage ${cylinder} wird gespeichert...`,
success: `Schließanlage ${cylinder.name} gespeichert.`,
error: 'Es ist ein Fehler aufgetreten'
})
).subscribe({
next: () => resolve(true),
error: () => resolve(false),
complete: () => {
this.refreshCylinders()
}
})
})
}
createKey(key: any) {
return this.http.post<IKey>('api/key', key);
}