From daf58bb1b5acb1d97d9235fbd545a25db0d169c4 Mon Sep 17 00:00:00 2001 From: Art Date: Sun, 12 Sep 2021 12:02:53 +0300 Subject: [PATCH] 100. Register service call (#12) --- .../src/app/service/authentication.service.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/support-portal-frontend/src/app/service/authentication.service.ts b/support-portal-frontend/src/app/service/authentication.service.ts index a45399c..60257e0 100644 --- a/support-portal-frontend/src/app/service/authentication.service.ts +++ b/support-portal-frontend/src/app/service/authentication.service.ts @@ -3,6 +3,7 @@ import {environment} from "../../environments/environment"; import {HttpClient, HttpErrorResponse, HttpResponse} from "@angular/common/http"; import {UserLogin} from "../dto/user-login"; import {Observable} from "rxjs"; +import {User} from "../model/user"; @Injectable({ providedIn: 'root' @@ -19,5 +20,9 @@ export class AuthenticationService { (`${this.host}/user/login`, userDto, {observe: 'response'}); } + public register(user: User): Observable { + return this.httpClient + .post(`${this.host}/user/register`, user); + } }