Skip to content

Commit

Permalink
prepare for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedkalash committed Jul 5, 2023
1 parent 1fb9e14 commit f9dc0b6
Show file tree
Hide file tree
Showing 16 changed files with 2 additions and 476 deletions.
8 changes: 0 additions & 8 deletions .todo.txt

This file was deleted.

35 changes: 0 additions & 35 deletions controllers/AuthController.php

This file was deleted.

25 changes: 0 additions & 25 deletions controllers/ContactController.php

This file was deleted.

105 changes: 0 additions & 105 deletions controllers/TestController.php

This file was deleted.

54 changes: 0 additions & 54 deletions core/view/ViewHandler.php

This file was deleted.

1 change: 0 additions & 1 deletion core/view/ViewPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
class ViewPath
{
public const ERROR_404 = "errors/_404.twig";
public const CONTACT = "contact.twig";
public const HOME = "home.twig";
public const ADD_PRODUCT = "add-product.twig";

Expand Down
17 changes: 0 additions & 17 deletions models/ProductAttribute.php

This file was deleted.

25 changes: 0 additions & 25 deletions models/User.php

This file was deleted.

56 changes: 0 additions & 56 deletions requests/RegisterRequest.php

This file was deleted.

4 changes: 1 addition & 3 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
declare(strict_types=1);

use app\controllers\ProductController;
use app\controllers\TestController;


return function (\app\core\Application $app) {
$prefix='/api/v1';
$app->router->post("$prefix/add-product", [ProductController::class,'store']);
$app->router->post("$prefix/products/mass-delete", [ProductController::class,'massDelete']);
$app->router->get("$prefix/products", [ProductController::class,'all']);


$app->router->get("$prefix/test", [TestController::class,'test']);
};
14 changes: 1 addition & 13 deletions routes/web.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
<?php
declare(strict_types=1);
use app\controllers\AuthController;
use app\controllers\ContactController;

use app\controllers\HomeController;
use app\controllers\ProductController;

return function (\app\core\Application $app) {
$app->router->get('/', [HomeController::class,'index']);
$app->router->get('/add-product', [ProductController::class,'create']);
//$app->router->post('/add-product', [ProductController::class,'store']);
// $app->router->post('/add-product', [ProductController::class,'massDelete']);

$app->router->get('/contact', [ContactController::class,'index']);
$app->router->post('/contact', [ContactController::class,'store']);

$app->router->get('/login', [AuthController::class,'showLoginPage']);
$app->router->post('/login', [AuthController::class,'login']);

$app->router->get('/register', [AuthController::class,'showRegisterPage']);
$app->router->post('/register', [AuthController::class,'register']);

$app->router->get('/test', [\app\controllers\TestController::class,'test']);
};
Loading

0 comments on commit f9dc0b6

Please sign in to comment.