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 presign endpoints for /api/v3 #1644

Merged
merged 9 commits into from
Apr 22, 2021

Conversation

orbitalsqwib
Copy link
Contributor

Problem

Updates current adminform presigned image/logo url generation endpoints to their /api rooted endpoints to follow a RESTful hierarchy.

Closes #1512

Solution

Features:

  • duplicate and update adminform presigned image/logo 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 logos can be uploaded to a form's header (POST /api/v3/admin/forms/:formId/logos/presign)
  • Check that images can be uploaded to a form image component (POST /api/v3/admin/forms/:formId/images/presign)

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
@orbitalsqwib orbitalsqwib requested a review from karrui April 14, 2021 11:01
…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
…i/v3

- duplicate and update adminform presigned image/logo 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/preview-api tracked by #1643

@karrui
Copy link
Contributor

karrui commented Apr 15, 2021

this makes it hard to review; you may want to change the target branch to the preview-api branch then. pls set to draft PR you are making rebase changes, was reviewing halfway and it got outdated haha

@orbitalsqwib
Copy link
Contributor Author

sorry about that, talked about how to deal with the concurrent PR merge conflicts with anty irl

@orbitalsqwib orbitalsqwib changed the base branch from develop to ref/preview-api April 15, 2021 03:13
@orbitalsqwib orbitalsqwib marked this pull request as draft April 15, 2021 05:54
Base automatically changed from ref/preview-api to develop April 21, 2021 06:38
@orbitalsqwib orbitalsqwib marked this pull request as ready for review April 21, 2021 07:28
@orbitalsqwib orbitalsqwib requested a review from mantariksh April 21, 2021 07:29
Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

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

lgtm

- shift validators into admin-form controller
- update handler methods to include validators as request handler array
- update controller integration tests
- update old routes to use new handler
- update new routes to use new handleri
@orbitalsqwib orbitalsqwib requested a review from mantariksh April 22, 2021 05:33
@orbitalsqwib orbitalsqwib merged commit 78d0164 into develop Apr 22, 2021
@orbitalsqwib orbitalsqwib deleted the ref/presign-api branch April 22, 2021 05:34
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 generate image/logo presigned url endpoints to their new /api counterparts
3 participants