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

refactor(preview-api): duplicate adminform preview endpoints for /api/v3 #1643

Merged
merged 10 commits into from
Apr 21, 2021

Conversation

orbitalsqwib
Copy link
Contributor

Problem

Updates current adminform preview-related endpoints to their /api rooted endpoints to follow a RESTful hierarchy.

Closes #1510

Solution

Features:

  • duplicate and update adminform preview related endpoints
  • duplicate integration tests for new endpoint
  • update v3 router to use new endpoints
  • update frontend api calls to use new endpoints

Tests

  • Check that forms can be previewed as admin (GET /api/v3/admin/forms/:formId/preview)
  • Check that previewed forms in email mode can be submitted and an email response is received (POST /api/v3/admin/forms/:formId/preview/submissions/email)
  • Check that previewed forms in encrypt mode can be submitted (POST /api/v3/admin/forms/:formId/preview/submissions/encrypt)

orbitalsqwib and others added 3 commits April 13, 2021 17:32
…/v3i

- duplicate and update adminform form related endpoints
- duplicate integration tests for new endpoint
- update v3 router to use new endpoints
- update frontend api calls to use new endpoints
…i/v3

- duplicate and update adminform preview related endpoints
- duplicate integration tests for new endpoint
- update v3 router to use new endpoints
- update frontend api calls to use new endpoints
@orbitalsqwib
Copy link
Contributor Author

Rebased this onto ref/admin-form-api tracked by #1635

@orbitalsqwib orbitalsqwib changed the base branch from develop to ref/admin-form-api April 15, 2021 03:14
@orbitalsqwib orbitalsqwib marked this pull request as draft April 15, 2021 05:54
Base automatically changed from ref/admin-form-api to develop April 19, 2021 06:38
@orbitalsqwib orbitalsqwib marked this pull request as ready for review April 20, 2021 09:22
Copy link
Contributor

@mantariksh mantariksh left a comment

Choose a reason for hiding this comment

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

can I double check that you've tested all 3 endpoints locally? I'm ok if we don't test on staging for this one

- shift validators into admin-form controller
- update handler methods to include middleware as request handler array
- update controller integration tests
- update old routes to use new handler
- update new routes to use new handler
@mantariksh
Copy link
Contributor

to fix merge conflicts before approval

@mantariksh
Copy link
Contributor

@orbitalsqwib gotta fix merge conflicts again I think

@orbitalsqwib orbitalsqwib merged commit b99b40c into develop Apr 21, 2021
@orbitalsqwib orbitalsqwib deleted the ref/preview-api branch April 21, 2021 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API] Duplicate admin form preview related endpoints to their new /api counterparts
2 participants