<?php

use App\Controllers\AuthController;
use App\Controllers\CategoryController;
use App\Controllers\BrandController;
use App\Controllers\ProductController;

use App\Middleware\JwtMiddleware;


return [

    /**
     * LOGIN
     */
    'POST /login' => [
        'controller' => [AuthController::class, 'login'],
        'middleware' => []
    ],

    /**
     * CATEGORIES
     */
    'POST /categories' => [
        'controller' => [CategoryController::class, 'getCategories'],
        'middleware' => [JwtMiddleware::class]
    ],
    'GET /category/{id}' => [
        'controller' => [CategoryController::class, 'getById'],
        'middleware' => [JwtMiddleware::class]
    ],

    /**
     * BRANDS 
     */
    'POST /brands' => [
        'controller' => [BrandController::class, 'getBrands'],
        'middleware' => [JwtMiddleware::class]
    ],
    'GET /brand/{id}' => [
        'controller' => [BrandController::class, 'getById'],
        'middleware' => [JwtMiddleware::class]
    ],

    /**
     * PRODUCTS
     */
    'POST /products' => [
        'controller' => [ProductController::class, 'getProducts'],
        'middleware' => [JwtMiddleware::class]
    ],
    'GET /product/{id}' => [
        'controller' => [ProductController::class, 'getById'],
        'middleware' => [JwtMiddleware::class]
    ],

];
