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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user