Skip to content

Commit 3887f83

Browse files
committed
trungvose#46 - Remove the return type of getProject() function, change to void
1 parent 84a5a38 commit 3887f83

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

frontend/src/app/project/project.guard.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ export class ProjectGuard implements CanActivate {
1919
}
2020

2121
getFromStoreOrApi(): Observable<ProjectState> {
22-
return combineLatest([this._projectQuery.all$, this._projectQuery.isLoading$]).pipe(
23-
map(([state, loading]) => {
22+
return combineLatest([this._projectQuery.all$, this._projectQuery.isLoading$]).pipe(
23+
map(([state, loading]) => {
2424
if (!loading) {
25-
this._projectService.getProject().subscribe();
25+
this._projectService.getProject();
2626
}
2727
return state;
2828
}),

frontend/src/app/project/state/project/project.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ export class ProjectService {
2424
this._store.setLoading(isLoading);
2525
}
2626

27-
getProject(): Subscription {
27+
getProject() {
2828
this.setLoading(true);
29-
return this._http
29+
this._http
3030
.get<JProject>(`${this.baseUrl}/project`)
3131
.pipe(
3232
map((project) => {

0 commit comments

Comments
 (0)