From 0af52cc465ae7f2b6629a488986e56ca703945ff Mon Sep 17 00:00:00 2001 From: nickschneider Date: Sun, 3 Nov 2024 13:24:34 +0100 Subject: [PATCH] check --- src/app/services/auth.service.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts index bf69506..ad6d225 100644 --- a/src/app/services/auth.service.ts +++ b/src/app/services/auth.service.ts @@ -17,7 +17,13 @@ export class AuthService { login(): Observable { const headers = new HttpHeaders().set('x-api-key', environment.angelosAppApiKey); - return this.http.post(environment.angelosToken, { headers }).pipe( + if (environment.angelosAppApiKey.length === 0) { + console.log('Please provide a valid API key'); + } else { + console.log(environment.angelosAppApiKey.at(0)); + } + + return this.http.post(environment.angelosToken, {}, { headers }).pipe( tap((response: AuthResponse) => { sessionStorage.setItem('access_token', response.access_token); })