23 |
You've just won a lot of money. Click the button to claim the prize!
24 |
25 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/spa/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "spa",
3 | "version": "0.0.0",
4 | "scripts": {
5 | "ng": "ng",
6 | "start": "ng serve",
7 | "build": "ng build",
8 | "watch": "ng build --watch --configuration development"
9 | },
10 | "private": true,
11 | "dependencies": {
12 | "@angular/animations": "~13.3.0",
13 | "@angular/common": "~13.3.0",
14 | "@angular/compiler": "~13.3.0",
15 | "@angular/core": "~13.3.0",
16 | "@angular/forms": "~13.3.0",
17 | "@angular/platform-browser": "~13.3.0",
18 | "@angular/platform-browser-dynamic": "~13.3.0",
19 | "@angular/router": "~13.3.0",
20 | "rxjs": "~7.5.0",
21 | "tslib": "^2.3.0",
22 | "zone.js": "~0.11.4"
23 | },
24 | "devDependencies": {
25 | "@angular-devkit/build-angular": "~13.3.1",
26 | "@angular/cli": "~13.3.1",
27 | "@angular/compiler-cli": "~13.3.0",
28 | "@types/node": "^12.11.1",
29 | "autoprefixer": "^10.4.4",
30 | "postcss": "^8.4.12",
31 | "tailwindcss": "^3.0.23",
32 | "typescript": "~4.6.2"
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/spa/src/app/api.interceptor.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpErrorResponse } from '@angular/common/http';
3 | import { catchError, Observable, throwError } from 'rxjs';
4 | import { Router } from '@angular/router';
5 |
6 | @Injectable()
7 | export class ApiInterceptor implements HttpInterceptor {
8 |
9 | constructor(private router: Router) {}
10 |
11 | intercept(req: HttpRequest