Open taylordowns2000 opened 6 months ago
For discussion later, I spoke about this with @midigofrank and we found the spot that changed.
Before this commit, create_project
only created projects. The pattern in use was:
def some_save_button do
create_project
send_email
end
and that's exactly what I'd like to see. In the commit above create_project
got modified so that it really is create_project_and_send_email
, and the other parts of the app that call create_project
are now trying to send emails. (It's not many I don't think, but it's still a significant change in what that deep "crud-sounding" function does.)
For what it's worth, the only impacted places here are setup_utils
and the load tests.
There are a bunch of account-related features that need unpicking.
Lightning.Projects.create_project
was recently extended and now includes some emailing behaviour. Some unwanted side effects appeared, and we think that it's a good time to refactor these contexts and functions.Ideally, we'd always have the ability to create a project or create a user without sending emails. If we want to introduce more complex business logic like that introduced here we should consider a higher level function (like a service) that does a number of things.
By changing the deep
create_project
function like in the commit above, we risk modifying a lot of application behaviour.