()
| 59 | * Parse Requests |
| 60 | */ |
| 61 | const postData = async () => { |
| 62 | try { |
| 63 | const gameScore = new Parse.Object('GameScore'); |
| 64 | gameScore.set('score', 1337); |
| 65 | gameScore.set('playerName', 'Sean Plott'); |
| 66 | gameScore.set('cheatMode', false); |
| 67 | |
| 68 | const result = await gameScore.save(); |
| 69 | Store.objectId = result.id; |
| 70 | |
| 71 | closeStep('#step-1'); |
| 72 | fillStepOutput('#step-1-output', JSON.stringify(result)); |
| 73 | fillBtn('#step-1-btn', 'Posted'); |
| 74 | openStep('#step-2'); |
| 75 | |
| 76 | bindBtn('#step-2-btn', async (e) => { |
| 77 | e.preventDefault(); |
| 78 | await getData(); |
| 79 | }); |
| 80 | } catch (error) { |
| 81 | fillStepError('#step-1-error', `There was a failure: ${error.message}`); |
| 82 | } |
| 83 | }; |
| 84 | |
| 85 | const getData = async () => { |
| 86 | try { |
no test coverage detected