optimize tenant with saldo query

This commit is contained in:
2021-09-14 14:14:56 +02:00
parent 797cbb4b65
commit 76255efbe9
9 changed files with 138 additions and 9 deletions

View File

@ -7,7 +7,7 @@ import { serviceBaseUrl } from './config';
import { Fee, OverheadAdvance } from './data-objects';
import { Saldo } from './ext-data-objects';
import { Saldo, Tenant_with_Saldo } from './ext-data-objects';
@Injectable({ providedIn: 'root' })
@ -28,4 +28,9 @@ export class ExtApiService {
this.messageService.add(`ExtApiService: get saldo for account ${id}`);
return this.http.get<Saldo>(`${serviceBaseUrl}/v1/account/saldo/${id}`).toPromise()
}
async getTenantsWithSaldo(): Promise<Tenant_with_Saldo[]> {
this.messageService.add("ExtApiService: get tenants with saldo");
return this.http.get<Tenant_with_Saldo[]>(`${serviceBaseUrl}/v1/tenants/saldo`).toPromise()
}
}