From 639c3e4456247f070179971f0ae426431b4da467 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 7 Aug 2020 22:51:33 +0800 Subject: Fix a bug in user. --- Timeline/ClientApp/src/app/data/user.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Timeline/ClientApp/src') diff --git a/Timeline/ClientApp/src/app/data/user.ts b/Timeline/ClientApp/src/app/data/user.ts index defcb4e4..1d2d6f88 100644 --- a/Timeline/ClientApp/src/app/data/user.ts +++ b/Timeline/ClientApp/src/app/data/user.ts @@ -7,6 +7,7 @@ import { pushAlert } from '../common/alert-service'; import { dataStorage } from './common'; import { SubscriptionHub, ISubscriptionHub } from './SubscriptionHub'; +import { queue } from './queue'; import { HttpNetworkError, BlobWithEtag, NotModified } from '../http/common'; import { @@ -18,7 +19,6 @@ import { HttpUserNotExistError, HttpUser, } from '../http/user'; -import { queue } from './queue'; export type User = HttpUser; @@ -252,7 +252,7 @@ export class UserInfoService { const cache = await dataStorage.getItem(key); if (cache == null) { try { - const avatar = await getHttpUserClient().getAvatar(key); + const avatar = await getHttpUserClient().getAvatar(username); await dataStorage.setItem(key, avatar); return { data: avatar.data, @@ -267,7 +267,7 @@ export class UserInfoService { } } else { try { - const res = await getHttpUserClient().getAvatar(key, cache.etag); + const res = await getHttpUserClient().getAvatar(username, cache.etag); if (res instanceof NotModified) { return { data: cache.data, -- cgit v1.2.3