Skip to content

Commit

Permalink
fix(application): fix application page
Browse files Browse the repository at this point in the history
  • Loading branch information
PxyUp committed Jan 29, 2021
1 parent 4f3d276 commit eb677e7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/app/modules/applications/services/applications.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ export class ApplicationsService {
}

getList() {
return this.httpClient.get<Array<Application>>(`/api/v1/applications`);
return this.httpClient
.get<Array<Application>>(`/api/v1/applications`)
.pipe(
map((list) =>
(list || []).filter(
(item) => item.status !== ApplicationStatus.APPLICATION_STATUS_ARCHIVED,
),
),
);
}

enabled(id: string) {
Expand All @@ -119,6 +127,6 @@ export class ApplicationsService {
}

archived(id: string) {
return this.httpClient.delete<Application>(`/api/v1/applications/${id}/archived`, null);
return this.httpClient.delete<Application>(`/api/v1/applications/${id}/archived`);
}
}

0 comments on commit eb677e7

Please sign in to comment.