Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

create individual form controller #140

Open
GammaMicrowave opened this issue Jun 11, 2023 · 0 comments
Open

create individual form controller #140

GammaMicrowave opened this issue Jun 11, 2023 · 0 comments

Comments

@GammaMicrowave
Copy link
Contributor

GammaMicrowave commented Jun 11, 2023

  • In form.controller.js erase dashboard function in line 146
  • create a brand new controller named getForm
  • It will have formId in req.params
  • use this id and find the form by equating the id with formId string field.
  • fetch formSubmissions which has the same formId using prisma.
  • return data fetched as an object containing formData field keeping data of form and a array of formSubmissionData containing formSubmission data.

Note:- Use mongoose.aggregate if you want implement any complex query.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant