Skip to content

Commit

Permalink
GH-54 fix(netlify): correct field name when reading documentId parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jul 6, 2020
1 parent 6f13055 commit 4101d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/submission-created.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ exports.handler = async (event) => {

if (payload.form_name === 'review-rating') {
const ratingAsString = (payload.data.rating || '').trim();
const sanityDocumentId = (payload.data.documentId || '').trim();
const sanityDocumentId = (payload.data['document-id'] || '').trim();

if (
isNaN(ratingAsString) ||
Expand Down

0 comments on commit 4101d32

Please sign in to comment.