aboutsummaryrefslogtreecommitdiff
path: root/src/screens/profile/CaptionScreen.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens/profile/CaptionScreen.tsx')
-rw-r--r--src/screens/profile/CaptionScreen.tsx20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx
index 1b96face..d53570cb 100644
--- a/src/screens/profile/CaptionScreen.tsx
+++ b/src/screens/profile/CaptionScreen.tsx
@@ -147,19 +147,13 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
// separate upload logic for image/video
if (isMediaAVideo) {
const presignedURL = await handlePresignedURL(mediaFilename, title);
- // TOOD: ignoring type error for PoC reason
- const response: {
- response_msg: string;
- response_url: string;
- moment_id: string;
- } = handleVideoUpload(
- {
- filename: mediaFilename,
- sourceURL: mediaUri,
- },
- presignedURL,
- );
- momentId = response.moment_id;
+ if (!presignedURL) {
+ handleFailed();
+ return;
+ }
+ momentId = presignedURL.moment_id;
+ // TODO: assume success for now
+ await handleVideoUpload(mediaFilename, mediaUri, presignedURL);
} else {
const momentResponse = await postMoment(
mediaFilename,