web: update for new cached actions

This commit is contained in:
Jens Langhammer
2021-02-19 16:34:43 +01:00
parent 47bde052ca
commit 44e51970e1
3 changed files with 245 additions and 129 deletions

View File

@ -40,8 +40,8 @@ export class Flow {
}
static cached(): Promise<number> {
return DefaultClient.fetch<AKResponse<Flow>>(["flows", "cached"]).then(r => {
return r.pagination.count;
return DefaultClient.fetch<{ count: number }>(["flows", "all", "cached"]).then(r => {
return r.count;
});
}
static adminUrl(rest: string): string {

View File

@ -20,8 +20,8 @@ export class Policy implements BaseInheritanceModel {
}
static cached(): Promise<number> {
return DefaultClient.fetch<AKResponse<Policy>>(["policies", "cached"]).then(r => {
return r.pagination.count;
return DefaultClient.fetch<{ count: number }>(["policies", "all", "cached"]).then(r => {
return r.count;
});
}
}