jaikamat / clubhouse-pos-importer

Monorepo for an LGS's inventory management system
1 stars 0 forks source link

Extract controllers #264

Closed jaikamat closed 3 years ago

jaikamat commented 3 years ago

Summary

The auth/ route was growing tremendously, which necessitated splitting it up into separate files for easier management.

I created a controllers folder, and extracted out each associated auth controller. Types were reincorporated with each, and a universal Controller type was extracted to manage each controller’s function signature.

Additionally, the addCardToInventory controller’s validation middleware was combined with the actual controller to streamline it.