Skip to content

Commit

Permalink
Remove schema validation for message & current_entry for now..
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottprogrammer authored and monsieur-z committed Nov 5, 2020
1 parent 9c4efd3 commit 80e1af5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/state/data-layer/wpcom/sites/rewind/api-transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ const transformRewind = ( data ) =>
rewindId: data.rewind_id,
startedAt: new Date( data.started_at ),
status: data.status,
message: data.message,
currentEntry: data.current_entry,
},
data.message && { message: data.message },
data.current_entry && { currentEntry: data.current_entry },
data.progress && { progress: data.progress },
data.reason && { reason: data.reason },
data.links && data.links.dismiss && { dismiss: makeRewindDismisser( data.links.dismiss ) }
Expand Down
9 changes: 7 additions & 2 deletions client/state/data-layer/wpcom/sites/rewind/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ export const rewind = {
started_at: { type: 'string' },
progress: { type: 'integer' },
reason: { type: 'string' },
message: { type: 'string' },
current_entry: { type: 'string' },
/**
* Commenting these out temporarily because API is returning a null value for current_entry,
* triggering a schema validation error. Once this is corrected on the backend (soon), we
* will activate these properties again.
**/
// message: { type: 'string' },
// current_entry: { type: 'string' },
},
required: [ 'restore_id', 'rewind_id', 'status' ],
};
Expand Down

0 comments on commit 80e1af5

Please sign in to comment.