diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2025-02-26 22:50:01 -0500 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2025-02-26 22:50:01 -0500 |
commit | 897a4d53505d23c8b1f96c14b0a8984932fae699 (patch) | |
tree | 664090526d6f6674daadf4246651f7e3c58efa60 /ufund-ui/src/app/services/users.service.ts | |
parent | 501ac045d6042f194e2a5dbc4d7f4abccaf2732b (diff) | |
download | JellySolutions-897a4d53505d23c8b1f96c14b0a8984932fae699.tar.gz JellySolutions-897a4d53505d23c8b1f96c14b0a8984932fae699.tar.bz2 JellySolutions-897a4d53505d23c8b1f96c14b0a8984932fae699.zip |
Clean up project and start implementation of user sign in system
Diffstat (limited to 'ufund-ui/src/app/services/users.service.ts')
-rw-r--r-- | ufund-ui/src/app/services/users.service.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ufund-ui/src/app/services/users.service.ts b/ufund-ui/src/app/services/users.service.ts index 1b6dfb6..571c004 100644 --- a/ufund-ui/src/app/services/users.service.ts +++ b/ufund-ui/src/app/services/users.service.ts @@ -8,6 +8,8 @@ import {User} from '../models/User'; }) export class UsersService { + private currentUserID? : number + private url = "http://localhost:8080/users" private httpOptions = { headers: new HttpHeaders({'Content-Type': 'application/json'}) @@ -32,4 +34,8 @@ export class UsersService { deleteUser(id: number): Observable<boolean> { return this.http.delete<boolean>(`${this.url}/${id}`, this.httpOptions) } + + getCurrentUser(): Observable<User> | undefined { + return this.currentUserID ? this.getUser(this.currentUserID) : undefined + } } |