new shizzle for nizzle

This commit is contained in:
2025-03-12 23:44:29 +01:00
parent 6b72efe9d0
commit c3663e4c6e
19 changed files with 179 additions and 71 deletions

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { JwtHelperService } from '@auth0/angular-jwt';
import { Observable } from 'rxjs';
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {JwtHelperService} from '@auth0/angular-jwt';
import {Observable} from 'rxjs';
import {jwtDecode} from 'jwt-decode';
@Injectable({
@@ -12,10 +12,11 @@ export class AuthService {
// baseApi = "https://api.melvanveen.nl/api/auth/login";
jwtHelper = new JwtHelperService();
constructor(private http: HttpClient) {}
constructor(private http: HttpClient) {
}
login(username: string, password: string): Observable<any> {
return this.http.post(this.baseApi, { username, password });
return this.http.post(this.baseApi, {username, password});
}
isAuthenticated(): boolean {