Please create a middleware to only execute the setup_wizard endpoint if the below exists and applies:
No users in users table.
DB is fully empty.
Note:
create the validation both in API and DB's trigger.
Prevent extra queries and params in the route by using Joi. Just like we have used in other routes.
Please create a middleware to only execute the setup_wizard endpoint if the below exists and applies:
Note: create the validation both in API and DB's trigger. Prevent extra queries and params in the route by using Joi. Just like we have used in other routes.