Skip to content

Add API endpoint to get the group for a form#2748

Open
stephencdaly wants to merge 1 commit intomainfrom
add-api-endpoint-for-getting-contact-details-for-group
Open

Add API endpoint to get the group for a form#2748
stephencdaly wants to merge 1 commit intomainfrom
add-api-endpoint-for-getting-contact-details-for-group

Conversation

@stephencdaly
Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

Trello card: https://trello.com/c/CsEqMtDL

Add an API endpoint that returns the group details for the form with the given ID. This includes the group admin users, and the organisation details including the organisation admin users as embedded resources.

This endpoint will be used by forms-runner to get the group and organisation details for the form and the contact details for the group and organisation admin users in order to send email notifications when submissions bounce.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

Add an API endpoint that returns the group details for the form with
the given ID. This includes the group admin users, and the
organisation details including the organisation admin users as
embedded resources.

This endpoint will be used by forms-runner to get the group and
organisation details for the form and the contact details for the
group and organisation admin users in order to send email
notifications when submissions bounce.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2748.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

let(:headers) { { "ACCEPT": "application/json" } }

describe "GET /show" do
describe "GET #show" do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think what was there before was correct, based on the other request specs in this repo, and the template in rspec-rails

Suggested change
describe "GET #show" do
describe "GET /show" do

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm actually I think neither are consistent with how we usually do it elsewhere.
Looks like we do describe "GET /path" or describe "#action"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh yeah you're right /show is an action not a path

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.

2 participants