Skip to content

Create single form fetching endpoint#23

Merged
jb3 merged 7 commits into
mainfrom
ks123/form-endpoint
Dec 13, 2020
Merged

Create single form fetching endpoint#23
jb3 merged 7 commits into
mainfrom
ks123/form-endpoint

Conversation

@ks129
Copy link
Copy Markdown
Contributor

@ks129 ks129 commented Dec 13, 2020

  • Created custom dict function for Form model to return only public fields when user is not admin.
  • Return only public fields for discovery.
  • Move form creation to /forms POST from /forms/new.
  • Created route for getting single form that return all fields and all forms for admins, but only public fields and open forms for others.
  • Closes Add route for returning a form #20

@ks129 ks129 added the area: route Code that will create a new route on the web application. label Dec 13, 2020
@ks129 ks129 requested a review from jb3 as a code owner December 13, 2020 14:18
@ghost ghost added the needs 1 approval label Dec 13, 2020
Copy link
Copy Markdown
Member

@jb3 jb3 left a comment

Choose a reason for hiding this comment

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

The changing of /new to / is incorrect here. We should delete the new file entirely and instead add a new post method to the route at backend/routes/forms/index.py

Copy link
Copy Markdown
Member

@jb3 jb3 left a comment

Choose a reason for hiding this comment

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

One more minor thing

Comment thread backend/routes/forms/index.py Outdated
Co-authored-by: Joe Banks <joseph@josephbanks.me>
@ks129 ks129 requested a review from jb3 December 13, 2020 18:59
@ghost ghost removed the needs 1 approval label Dec 13, 2020
@jb3 jb3 merged commit 7c29f88 into main Dec 13, 2020
@jb3 jb3 deleted the ks123/form-endpoint branch December 13, 2020 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: route Code that will create a new route on the web application.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add route for returning a form

2 participants