Skip to content

Commit

Permalink
check
Browse files Browse the repository at this point in the history
  • Loading branch information
Unischneider committed Nov 3, 2024
1 parent 8d1a114 commit 0af52cc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ export class AuthService {

login(): Observable<AuthResponse> {
const headers = new HttpHeaders().set('x-api-key', environment.angelosAppApiKey);
return this.http.post<AuthResponse>(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<AuthResponse>(environment.angelosToken, {}, { headers }).pipe(
tap((response: AuthResponse) => {
sessionStorage.setItem('access_token', response.access_token);
})
Expand Down

0 comments on commit 0af52cc

Please sign in to comment.