diff options
author | crupest <crupest@outlook.com> | 2020-08-07 22:51:33 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-07 22:51:33 +0800 |
commit | 639c3e4456247f070179971f0ae426431b4da467 (patch) | |
tree | 870261555406c8c999b68c72bbaec245f775e068 /Timeline/ClientApp/src | |
parent | 0f89ad243258e83940528732e90a4ba6fbc16bef (diff) | |
download | timeline-639c3e4456247f070179971f0ae426431b4da467.tar.gz timeline-639c3e4456247f070179971f0ae426431b4da467.tar.bz2 timeline-639c3e4456247f070179971f0ae426431b4da467.zip |
Fix a bug in user.
Diffstat (limited to 'Timeline/ClientApp/src')
-rw-r--r-- | Timeline/ClientApp/src/app/data/user.ts | 6 |
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,
|