From d310ef72ee277aee726a7c3b34a729873a2b1270 Mon Sep 17 00:00:00 2001 From: ItzMineyy Date: Sat, 28 Dec 2024 15:05:22 +0100 Subject: [PATCH] Changed to local requests --- src/app/auth.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/auth.service.ts b/src/app/auth.service.ts index 3e3e44d..e905764 100644 --- a/src/app/auth.service.ts +++ b/src/app/auth.service.ts @@ -7,12 +7,12 @@ import {Observable, tap} from 'rxjs'; }) export class AuthService { - private apiUrl = 'http://localhost:7020/api/auth/login'; // Replace with your API endpoint + private apiUrl = '/api/auth/login'; // Replace with your API endpoint constructor(private http: HttpClient) {} login(username: string, password: string): Observable { - return this.http.post('http://localhost:7020/api/auth/login', { username, password }) + return this.http.post(this.apiUrl, { username, password }) .pipe( tap((response: any) => { // Store token in localStorage after successful login