Closed manedurphy closed 3 years ago
@manedurphy great idea to take out the models since I use them in both my seed and db files. And yes I would definitely like to make the reviews50 function more concise, I will hit you up about it when we finish setting up the proxies!
https://github.com/FEC-corgis/Jenny-Service-Reviews/blob/d99cbb07f11864f8796a3d98d6410db931e3783c/database/db.js#L80
I've noticed some repeated code between your database initialization file and your seeding script file. Try to organize thing based on the category they fall in to. You can have a file for each model you define, and export them accordingly should they be needed somewhere else.
Another thing I would try to revise is that "reviews" 50 function. I would be interested to see it work in action and see if there is a way to condense that logic. Happy to go over it together :D