Skip to content

Commit

Permalink
rename release_time to releaseTime
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Yesmunt committed Mar 5, 2021
1 parent 251c646 commit c31161c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dist/bundle.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -4692,7 +4692,7 @@ const doPublish = (success, fail, preview) => (dispatch, getState) => {
filePath,
description,
language,
release_time,
releaseTime,
license,
licenseUrl,
useLBRYUploader,
Expand Down Expand Up @@ -4760,8 +4760,8 @@ const doPublish = (success, fail, preview) => (dispatch, getState) => {
}

// Set release time to curret date. On edits, keep original release/transaction time as release_time
if (release_time) {
publishPayload.release_time = Number(Math.round(new Date(release_time) / 1000));
if (releaseTime) {
publishPayload.release_time = Number(Math.round(new Date(releaseTime) / 1000));
} else if (myClaimForUriEditing && myClaimForUriEditing.value.release_time) {
publishPayload.release_time = Number(myClaimForUri.value.release_time);
} else if (myClaimForUriEditing && myClaimForUriEditing.timestamp) {
Expand Down Expand Up @@ -5935,7 +5935,7 @@ const defaultState$4 = {
uploadThumbnailStatus: API_DOWN,
description: '',
language: '',
release_time: undefined,
releaseTime: undefined,
nsfw: false,
channel: CHANNEL_ANONYMOUS,
channelId: '',
Expand Down
6 changes: 3 additions & 3 deletions src/redux/actions/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export const doPublish = (success: Function, fail: Function, preview: Function)
filePath,
description,
language,
release_time,
releaseTime,
license,
licenseUrl,
useLBRYUploader,
Expand Down Expand Up @@ -342,8 +342,8 @@ export const doPublish = (success: Function, fail: Function, preview: Function)
}

// Set release time to curret date. On edits, keep original release/transaction time as release_time
if (release_time) {
publishPayload.release_time = Number(Math.round(new Date(release_time) / 1000));
if (releaseTime) {
publishPayload.release_time = Number(Math.round(new Date(releaseTime) / 1000));
} else if (myClaimForUriEditing && myClaimForUriEditing.value.release_time) {
publishPayload.release_time = Number(myClaimForUri.value.release_time);
} else if (myClaimForUriEditing && myClaimForUriEditing.timestamp) {
Expand Down
3 changes: 2 additions & 1 deletion src/redux/reducers/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type PublishState = {
uploadThumbnailStatus: string,
description: string,
language: string,
releaseTime: ?string,
channel: string,
channelId: ?string,
name: string,
Expand Down Expand Up @@ -54,7 +55,7 @@ const defaultState: PublishState = {
uploadThumbnailStatus: THUMBNAIL_STATUSES.API_DOWN,
description: '',
language: '',
release_time: undefined,
releaseTime: undefined,
nsfw: false,
channel: CHANNEL_ANONYMOUS,
channelId: '',
Expand Down

0 comments on commit c31161c

Please sign in to comment.