aboutsummaryrefslogtreecommitdiff
path: root/src/store/actions/user.ts
diff options
context:
space:
mode:
authorMichael <michael.foiani@gmail.com>2021-08-13 11:48:33 -0400
committerMichael <michael.foiani@gmail.com>2021-08-13 11:48:33 -0400
commit253c48d6d17589c4ee3d0589a995af32ae4e04b8 (patch)
tree5834911282197febb058e5c1aa47f87fb97012c8 /src/store/actions/user.ts
parent4c1a1f11275a5b90b575b0e9947dc618f8e54aca (diff)
parent4b92b9d4d87a0c25fdbb21ff95230bae9b083677 (diff)
Merge branch 'master' of https://github.com/TaggiD-Inc/FrontendHEADmaster
Merged with new master.
Diffstat (limited to 'src/store/actions/user.ts')
-rw-r--r--src/store/actions/user.ts18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts
index f01e2bac..da11f403 100644
--- a/src/store/actions/user.ts
+++ b/src/store/actions/user.ts
@@ -291,7 +291,6 @@ export const handleImageMomentUpload =
imageUri: string,
caption: string,
momentCategory: string,
- userId: string,
formattedTags: {
x: number;
y: number;
@@ -302,7 +301,7 @@ export const handleImageMomentUpload =
async (dispatch) => {
try {
const handleError = (reason: string) => {
- console.error('Moment video upload failed,', reason);
+ console.error('Moment image upload failed,', reason);
dispatch({
type: setMomentUploadProgressBar.type,
payload: {
@@ -317,6 +316,13 @@ export const handleImageMomentUpload =
status: MomentUploadStatusType.UploadingToS3,
momentId: '',
originalVideoDuration: 1, // assume upload time for an image is same as a 1s video
+ momentInfo: {
+ type: 'image',
+ uri: imageUri,
+ caption,
+ category: momentCategory,
+ tags: formattedTags,
+ },
};
// set progress bar as loading
dispatch({
@@ -328,7 +334,6 @@ export const handleImageMomentUpload =
imageUri,
caption,
momentCategory,
- userId,
);
if (!momentPostResponse) {
handleError('Moment post failed');
@@ -407,6 +412,13 @@ export const handleVideoMomentUpload =
status: MomentUploadStatusType.UploadingToS3,
momentId: '',
originalVideoDuration: videoLength,
+ momentInfo: {
+ type: 'video',
+ uri: videoUri,
+ caption,
+ category: momentCategory,
+ tags: formattedTags,
+ },
};
// set progress bar as loading
dispatch({