aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-07 22:51:33 +0800
committercrupest <crupest@outlook.com>2020-08-07 22:51:33 +0800
commit639c3e4456247f070179971f0ae426431b4da467 (patch)
tree870261555406c8c999b68c72bbaec245f775e068
parent0f89ad243258e83940528732e90a4ba6fbc16bef (diff)
downloadtimeline-639c3e4456247f070179971f0ae426431b4da467.tar.gz
timeline-639c3e4456247f070179971f0ae426431b4da467.tar.bz2
timeline-639c3e4456247f070179971f0ae426431b4da467.zip
Fix a bug in user.
-rw-r--r--Timeline/ClientApp/src/app/data/user.ts6
1 files changed, 3 insertions, 3 deletions
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<BlobWithEtag | null>(key);
if (cache == null) {
try {
- const avatar = await getHttpUserClient().getAvatar(key);
+ const avatar = await getHttpUserClient().getAvatar(username);
await dataStorage.setItem<BlobWithEtag>(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,