This commit is contained in:
Eugene Pankov
2021-10-22 22:35:15 +02:00
parent c9aa8aac18
commit 5b64d034c4
9 changed files with 110 additions and 49 deletions

View File

@@ -6,7 +6,7 @@ import { User } from '../../api'
@Injectable({ providedIn: 'root' })
export class LoginService {
user: User
user: User | null
ready$ = new AsyncSubject<void>()
constructor (private http: HttpClient) {
@@ -14,6 +14,9 @@ export class LoginService {
}
async updateUser () {
if (!this.user) {
return
}
await this.http.put('/api/1/user', this.user).toPromise()
}