Prettied, Linted and updated angular.json according to the latest schematic of Angular CLI.
Now all that is needed is to make it ready for strict compiling. Removed eslint-plugin-prettier as it is not recommended and causes errors for both eslint and prettier Bumped to v8.0.0
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { EmployeeAttendance } from './employee-attendance';
|
||||
|
||||
import { ErrorLoggerService } from '../core/error-logger.service';
|
||||
|
||||
import { EmployeeAttendance } from './employee-attendance';
|
||||
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
|
||||
};
|
||||
@@ -33,7 +35,7 @@ export class EmployeeAttendanceService {
|
||||
}
|
||||
|
||||
save(employeeAttendance: EmployeeAttendance): Observable<EmployeeAttendance> {
|
||||
const id = employeeAttendance.employee.id;
|
||||
const { id } = employeeAttendance.employee;
|
||||
return <Observable<EmployeeAttendance>>(
|
||||
this.http
|
||||
.post<EmployeeAttendance>(`${url}/${id}`, employeeAttendance, httpOptions)
|
||||
|
||||
Reference in New Issue
Block a user