Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjaytkbabu committed Mar 7, 2024
1 parent de1f9a4 commit 6fe3951
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions angular/projects/admin-nrpti/src/app/services/acts.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,13 @@ export class ActService {
async init() {
this.api = `${this.configService.config['API_LOCATION']}${this.configService.config['API_PATH']}`;
await this.refreshAct().toPromise();
}

/**
* Refresh the list of agencies from the API.
* @returns {Observable<void>} An observable that completes when agencies are refreshed.
*/
refreshAct(): Observable<void> {
}
/**
* Refresh the list of agencies from the API.
* @returns {Observable<void>} An observable that completes when agencies are refreshed.
*/
refreshAct(): Observable<void> {
return new Observable<void>(observer => {
// let actCode = 'ACT_ERA'
const apiEndpoint = `${this.api}/acts-regulations`;
const getActsRegulationsURL = this.http.get<{ [key: string]: string }>(apiEndpoint);

Expand All @@ -56,12 +54,11 @@ export class ActService {
);
});
}

/**
/**
* Get the list of agencies.
* @returns {Object} A dictionary of acts and regulations.
*/
getAllActsAndRegulations() {
getAllActsAndRegulations() {
return this.actsRegulationsMap;
}
}
}

0 comments on commit 6fe3951

Please sign in to comment.