LabiciIvan / php-api-nutritional-project

A PHP API nutritional project
0 stars 0 forks source link

Code enhancements - tidy up #37

Open LabiciIvan opened 1 month ago

LabiciIvan commented 1 month ago

Description: This ticket is to clean up some code during development as well as to enhance parts where it is possible.

  1. Migration create-table-users.sql file found in /App/Database/migrations/ needs additional columns:
  1. Create a new directory into App/ named Middlewares and move the BaseMiddleware.php file into that directory.

  2. Move BaseController::class from App/Controllers to App/Classes;

  3. Refactor column expire_at from CURRENT_TIMESTAMP to DATE(), following the next structure:

expire_at DATE NOT NULL

LabiciIvan commented 1 month ago

Note:

Need to refactor the BaseMiddleware::class to allow the execution of the given middlewares directly from a class method if this method is not the __constructor of the class.