[DevEx]: Move all testing-specific endpoints into the TestController #425
Labels
dev experience
Improvements to the code base that make it easier/better/more enjoyable to contribute to Cuttle
good first issue
Good for newcomers
version-patch
An update that warrants a bumping the project's patch version (e.g. 4.0.0 => 4.0.1)
Improvement Summary
Currently some of the testing-specific endpoints (the ones only allowed during
development
orstaging
) are in the TestController, and some are in theapi/controllers/game
folder. We should consolidate all of them into the TestController for consistency and simplicity.Detailed Description
We should take all of the backend actions/endpoints which have the
'developmentOrStagingOnly'
policy applied to them inconfig/policies.js
and move them intoapi/controllers/TestController
. While we are at it, we should update the urls to be more consistent and remove unnecessary testing-specific endpoints. For the unnecessary endpoints we should delete the files in api/controllers/game/<unnecessary_endpoint_name>.js, the policy mapping inconfig/policies.js
, and the route mapping inconfig/routes.js
In particular:
/game/loadGameFixture
should be remapped to/test/loadGameFixture
inconfig/routes.js
and the corresponding endpoint file should be moved from api/controllers/game/load-fixtureto
api/test/load-game-fixture.js`The text was updated successfully, but these errors were encountered: