This commit is contained in:
Bastian Wagner
2026-06-29 14:34:34 +02:00
parent ecb902565d
commit 9a721f9e86
18 changed files with 884 additions and 7 deletions

View File

@@ -9,6 +9,7 @@ import {
RegisterRequest,
RegisterResponse,
ResendVerificationResponse,
TaskDigestPreference,
VerifyEmailResponse,
} from './auth.models';
@@ -64,6 +65,12 @@ export class AuthService {
.pipe(tap((user) => this.storeUser(user)));
}
updateTaskDigestPreference(preference: TaskDigestPreference): Observable<PublicUser> {
return this.http
.patch<PublicUser>(`${this.apiUrl}/me/task-digest`, { preference })
.pipe(tap((user) => this.storeUser(user)));
}
accessToken(): string | null {
return this.storage?.getItem(ACCESS_TOKEN_KEY) ?? null;
}