Fixed bugs in blog routes and added doc comments to all route files

Signed-off-by: rodude123 <rodude123@gmail.com>
This commit is contained in:
2023-06-09 14:50:20 +01:00
parent e339204bd7
commit e82ec15504
10 changed files with 108 additions and 4 deletions
+10
View File
@@ -11,12 +11,22 @@ use Slim\App;
class userRoutes implements routesInterface
{
private userData $user;
/**
* constructor used to instantiate a base user routes, to be used in the index.php file.
* @param App $app - the slim app used to create the routes
*/
public function __construct(App $app)
{
$this->user = new userData();
$this->createRoutes($app);
}
/**
* creates the routes for the user
* @param App $app - the slim app used to create the routes
* @return void - returns nothing
*/
public function createRoutes(App $app): void
{
$app->post("/user/login", function (Request $request, Response $response)