pages-core
pages-core copied to clipboard
Correctly set site engine when adding a site
User Story
As a user, when I specify the site engine when adding a site to Federalist, it should be used.
Background (Optional)
Currently, it seems as if this is ignored.
Acceptance Criteria
- [x] Specifying the site engine when adding a site works
- [ ] Change made live via deploy Federalist.
Level of effort - low
The front end is definitely POSTing the engine, e.g.:
federalist_1 | info: HTTP POST /v0/site
... "body":{"owner":"svenaas","repository":"ncd-test","engine":"node.js","organizationId":null}} ...
... "body":{"owner":"svenaas","repository":"ncd-test","engine":"static","organizationId":null}} ...
or
app_1 | info: HTTP POST /v0/site
... "body":{"owner":"svenaas","repository":"ncd-test","engine":"hugo","organizationId":null}} ...
But by the time api/services/SiteCreator's paramsForNewSite gets called the params it gets passed do not include that engine...
Oh, it's the controller. 🙄
Merged into staging, but not yet into production.
I just noticed that this wasn't closed yet. The commit associated with this fix has been in main for a long time.