Format docs using linter and prettier.

This commit is contained in:
Spencer Ofwiti
2021-05-11 20:51:48 +03:00
parent 5228842e61
commit 208c448984
309 changed files with 11327 additions and 3307 deletions

View File

@@ -101,7 +101,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="14" class="link-to-prism">src/app/_interceptors/error.interceptor.ts:14</a></div>
<div class="io-line">Defined in <a href="" data-line="15" class="link-to-prism">src/app/_interceptors/error.interceptor.ts:15</a></div>
</td>
</tr>
@@ -256,21 +256,21 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {Injectable} from &#x27;@angular/core&#x27;;
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Injectable } from &#x27;@angular/core&#x27;;
import {
HttpRequest,
HttpHandler,
HttpEvent,
HttpInterceptor, HttpErrorResponse
HttpInterceptor,
HttpErrorResponse,
} from &#x27;@angular/common/http&#x27;;
import {Observable, throwError} from &#x27;rxjs&#x27;;
import {catchError} from &#x27;rxjs/operators&#x27;;
import {ErrorDialogService, LoggingService} from &#x27;@app/_services&#x27;;
import {Router} from &#x27;@angular/router&#x27;;
import { Observable, throwError } from &#x27;rxjs&#x27;;
import { catchError } from &#x27;rxjs/operators&#x27;;
import { ErrorDialogService, LoggingService } from &#x27;@app/_services&#x27;;
import { Router } from &#x27;@angular/router&#x27;;
@Injectable()
export class ErrorInterceptor implements HttpInterceptor {
constructor(
private errorDialogService: ErrorDialogService,
private loggingService: LoggingService,
@@ -287,11 +287,13 @@ export class ErrorInterceptor implements HttpInterceptor {
} else {
// The backend returned an unsuccessful response code.
// The response body may contain clues as to what went wrong.
errorMessage &#x3D; &#x60;Backend returned code ${err.status}, body was: ${JSON.stringify(err.error)}&#x60;;
errorMessage &#x3D; &#x60;Backend returned code ${err.status}, body was: ${JSON.stringify(
err.error
)}&#x60;;
}
this.loggingService.sendErrorLevelMessage(errorMessage, this, {error: err});
this.loggingService.sendErrorLevelMessage(errorMessage, this, { error: err });
switch (err.status) {
case 401: // unauthorized
case 401: // unauthorized
this.router.navigateByUrl(&#x27;/auth&#x27;).then();
break;
case 403: // forbidden