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 | 282c28754a7225fb7f53aa7dfb7598fd54d2db88 (patch) | |
tree | 6326e2482fb1a6480e13daa584bae44e71e458b5 /Timeline/ClientApp/src/app/http/user.ts | |
parent | 6d5a9ba1c220a899aa239521e0ba699419583595 (diff) | |
download | timeline-282c28754a7225fb7f53aa7dfb7598fd54d2db88.tar.gz timeline-282c28754a7225fb7f53aa7dfb7598fd54d2db88.tar.bz2 timeline-282c28754a7225fb7f53aa7dfb7598fd54d2db88.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);
}
|