aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/data/user.ts
diff options
context:
space:
mode:
Diffstat (limited to 'Timeline/ClientApp/src/app/data/user.ts')
-rw-r--r--Timeline/ClientApp/src/app/data/user.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/Timeline/ClientApp/src/app/data/user.ts b/Timeline/ClientApp/src/app/data/user.ts
index 66fcd83c..b8f163eb 100644
--- a/Timeline/ClientApp/src/app/data/user.ts
+++ b/Timeline/ClientApp/src/app/data/user.ts
@@ -226,16 +226,16 @@ export function checkLogin(): UserWithToken {
export class UserNotExistError extends Error {}
export class UserInfoService {
- saveUser(user: HttpUser): Promise<void> {
+ saveUser(user: HttpUser): void {
const key = user.username;
- return this._userHub.optionalInitLineWithSyncAction(key, async (line) => {
+ void this._userHub.optionalInitLineWithSyncAction(key, async (line) => {
await this.doSaveUser(user);
line.next({ user, type: "synced" });
});
}
- saveUsers(users: HttpUser[]): Promise<void> {
- return Promise.all(users.map((user) => this.saveUser(user))).then();
+ saveUsers(users: HttpUser[]): void {
+ return users.forEach((user) => this.saveUser(user));
}
private getCachedUser(username: string): Promise<User | null> {
@@ -364,7 +364,7 @@ export class UserInfoService {
return getHttpUserClient()
.patch(username, { nickname }, user.token)
.then((user) => {
- void this.saveUser(user);
+ this.saveUser(user);
});
}
}