How can I use same controller functions on two different schemas, with different properties?
I have a user and an admin schema. Both have different properties. I have already defined the controller functions for user, and now I am realising that most of the controller functions for both user and admin are same. I don’t want to code the same logic twice. How can I change my controller functions so that if it is a user signing up only user properties are considered and if an admin is signing up only admin properties are signing. I don’t want to display a choice that would ask a person signing up about whether they are signing up as user or admin.