raygdev / repair-order-tracker

A repair order tracker for automotive technicians
https://repair-order-tracker.vercel.app
3 stars 1 forks source link

Create an abstract class for handling middleware logic #58

Open raygdev opened 8 hours ago

raygdev commented 8 hours ago

I need to create an abstract class for handling logic in my middleware. Right now the middleware is tightly coupled to mongodb and may look to change to a SQL db in the future. As I go, I am finding that the data is more relational than not. So I want to implement an abstract class with methods that mimic the logic of finding users and repair orders. Then create a concrete class that implements the methods. Those class methods should be used in the middleware so that they can be easily swapped out later.