Updated to angular 11
Now compiling with strict mode in typescript Need to error checking now
This commit is contained in:
@ -19,7 +19,7 @@ const serviceName = 'GuestBookService';
|
||||
export class GuestBookService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
|
||||
get(id: string): Observable<GuestBook> {
|
||||
get(id: string | null): Observable<GuestBook> {
|
||||
const getUrl: string = id === null ? url : `${url}/${id}`;
|
||||
return <Observable<GuestBook>>(
|
||||
this.http
|
||||
@ -28,7 +28,7 @@ export class GuestBookService {
|
||||
);
|
||||
}
|
||||
|
||||
list(date: string): Observable<GuestBookList> {
|
||||
list(date: string | null): Observable<GuestBookList> {
|
||||
const options = { params: new HttpParams().set('q', date === null ? '' : date) };
|
||||
return <Observable<GuestBookList>>(
|
||||
this.http
|
||||
|
||||
Reference in New Issue
Block a user