refactor: clean code
This commit is contained in:
@ -65,7 +65,7 @@ export default abstract class ApiService {
|
|||||||
return this.http.request<Type>(method, doneEndpoint, {
|
return this.http.request<Type>(method, doneEndpoint, {
|
||||||
withCredentials: request.withCredentials,
|
withCredentials: request.withCredentials,
|
||||||
headers: request.httpHeaders,
|
headers: request.httpHeaders,
|
||||||
body: request.data,
|
body: request.data
|
||||||
}).pipe(
|
}).pipe(
|
||||||
catchError(error => {
|
catchError(error => {
|
||||||
if (request.needAuth && !secondTry && error.status === 401)
|
if (request.needAuth && !secondTry && error.status === 401)
|
||||||
|
@ -55,7 +55,11 @@ export class ScheduleComponent {
|
|||||||
|
|
||||||
@ViewChild('tableHeader') childComponent!: TableHeaderComponent;
|
@ViewChild('tableHeader') childComponent!: TableHeaderComponent;
|
||||||
|
|
||||||
constructor(api: ScheduleService, route: ActivatedRoute, private importApi: ImportService, private notify: ToastrService, public dialog: MatDialog) {
|
constructor(api: ScheduleService,
|
||||||
|
route: ActivatedRoute,
|
||||||
|
private importApi: ImportService,
|
||||||
|
private notify: ToastrService,
|
||||||
|
public dialog: MatDialog) {
|
||||||
route.queryParams.subscribe(params => {
|
route.queryParams.subscribe(params => {
|
||||||
TabStorageService.selectDataFromQuery(params);
|
TabStorageService.selectDataFromQuery(params);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user