Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jatin create backend for custom forms #1139

Open
wants to merge 8 commits into
base: development
Choose a base branch
from

Conversation

JatinAgrawal94
Copy link
Contributor

@JatinAgrawal94 JatinAgrawal94 commented Oct 31, 2024

Description

Please include the exact bug/functionality description and a summary of the changes/ related issues. Please also include any other relevant motivation and context:
Screenshot 2024-10-16 at 7 20 53 AM

Related PRS (if any):

This backend PR is not related to development branch in frontend .

Main changes explained:

  • Create file src/controllers/formController.js and src/controllers/formController.spec.js .
  • Create file src/routes/formRouter.js and src/controllers/formRouter.test.js .
  • Create file src/models/forms.js and src/models/formResponse.js

How to test:

  1. check into current branch
  2. do npm install and npm run build to run this PR locally
  3. Clear site data/cache
  4. Use any API Testing tool for testing the API. (POSTMAN is recommended)

Screenshots or videos of changes:

Screen.Recording.2024-10-31.at.3.28.14.PM-2.mp4

Copy link
Contributor

@samarth9201 samarth9201 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While testing on postman, I got 404 error

image

@JatinAgrawal94
Copy link
Contributor Author

Please change the HTTP request type to POST.

@RashmiKY98
Copy link

Tested createform API and GET form API, it is working fine. However, when testing submit form API, I received the below error. Request you to look into the issue. I have attached the screenshot for your reference. Thank you!
Screenshot 2024-11-02 174121
Screenshot 2024-11-02 174152

Copy link

@audreydieuanh audreydieuanh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

POST createform and GET requests work correctly, but submit form returns 500 error.

Screenshot 2024-11-09 at 10 22 27 PM

@JatinAgrawal94
Copy link
Contributor Author

POST createform and GET requests work correctly, but submit form returns 500 error.

Screenshot 2024-11-09 at 10 22 27 PM

@audreydieuanh Please Provide a Proper Video showing the error mentioned in this image, so I can understand the issue in a better way. Thanks.

@JatinAgrawal94
Copy link
Contributor Author

Tested createform API and GET form API, it is working fine. However, when testing submit form API, I received the below error. Request you to look into the issue. I have attached the screenshot for your reference. Thank you! Screenshot 2024-11-02 174121 Screenshot 2024-11-02 174152

@RashmiKY98 The userID that you are using doesn't exist. Please properly copy your userID from DB and then review it again. Thanks.

@Hritvik111 Hritvik111 added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Nov 21, 2024
@mashpotato9
Copy link

I tested creating and retrieving form and they worked as expected, however I received 500 when submitting the form
Screenshot 2024-12-20 at 4 17 43 PM
Screenshot 2024-12-20 at 4 17 54 PM
Screenshot 2024-12-20 at 4 18 12 PM

@JatinAgrawal94 JatinAgrawal94 dismissed audreydieuanh’s stale review January 6, 2025 02:50

Requested re-review.

Copy link

@honglinchen0524 honglinchen0524 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Encountered server error when testing createform:

PR1139.mp4
image

Encountered Invalid User error when testing submit:
image

@jeyanthi-sm
Copy link

jeyanthi-sm commented Jan 18, 2025

All the routes are working except the /form/format route. I am receiving this message.
{
"message": "Form not found."
}
Please see the attached video for details.

now_pr-1139.mp4

Not sure why the endpoint Createform is being used instead of POST. Also, not sure why the endpoint is edit instead of PATCH.

The method and the procedure name do not match in this route:
formRouter.route('/form/format').post(controller.getFormFormat);

@jeyanthi-sm jeyanthi-sm self-requested a review January 20, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants