Last active
September 30, 2020 07:06
-
-
Save sainture/76ea1834c8c488b43d9a078f60a594f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class ApiResponseModel<T> { | |
| statusCode = ''; | |
| userFriendlyMessage = ''; | |
| object: T | undefined; | |
| } | |
| protected get<T>(endpoint: string, params: any): Observable<ApiResponseModel<T>> { | |
| return this.backendService.get(endpoint, { | |
| ...params | |
| }); | |
| } | |
| } | |
| // call | |
| this.get<Group[]>(this.endpoint(true)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment