Closed riley closed 8 years ago
I think the value is already embedded in the form itself. (I added it to populate the counts on the form list page.)
form {
...
stats: {
responses: n
}
...
}
Is making a separate call still necessary?
... but either way I should update "responses" to "submissions" for consistency. We will need to coordinate this with a change to the form list page.
hah, perfect. I didn't know about that. responses
could be submissionCount
or something. My first thought would be that responses
would be an array of the responses, but it's not a huge deal. File it under nice-to-have.
In order to build the pagination feature as designed here https://github.com/coralproject/cay/issues/414 I need a count of submissions so I can have a button go to the last page of submissions.
The endpoint should be
GET /api/form_submissions/<form_id>/count
and just return either a raw number in the response, or a json object{count: 5}
, whichever you prefer.This issue is blocking https://github.com/coralproject/cay/issues/299