diff options
author | crupest <crupest@outlook.com> | 2020-08-08 22:51:01 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-08 22:51:01 +0800 |
commit | 63920dcf97ef19d036fa364e54be15193c5a8239 (patch) | |
tree | 27d0de2411c8a089895a608f4dc395da96d30ed5 /Timeline/ClientApp/src/app/http/user.ts | |
parent | 1eb0fe83a57834348d51639ac840850e380ca81f (diff) | |
download | timeline-63920dcf97ef19d036fa364e54be15193c5a8239.tar.gz timeline-63920dcf97ef19d036fa364e54be15193c5a8239.tar.bz2 timeline-63920dcf97ef19d036fa364e54be15193c5a8239.zip |
Fix bugs.
Diffstat (limited to 'Timeline/ClientApp/src/app/http/user.ts')
-rw-r--r-- | Timeline/ClientApp/src/app/http/user.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Timeline/ClientApp/src/app/http/user.ts b/Timeline/ClientApp/src/app/http/user.ts index 8d5e8a0b..baa831aa 100644 --- a/Timeline/ClientApp/src/app/http/user.ts +++ b/Timeline/ClientApp/src/app/http/user.ts @@ -8,7 +8,8 @@ import { convertToIfErrorCodeIs,
NotModified,
BlobWithEtag,
- convertToBlobWithEtagOrNotModified,
+ convertToBlobWithEtag,
+ convertToNotModified,
} from './common';
export interface HttpUser {
@@ -92,7 +93,8 @@ export class HttpUserClient implements IHttpUserClient { responseType: 'blob',
headers,
})
- .then(convertToBlobWithEtagOrNotModified)
+ .then(convertToBlobWithEtag)
+ .catch(convertToNotModified)
.catch(convertToIfStatusCodeIs(404, HttpUserNotExistError))
.catch(convertToNetworkError);
}
|