<?php

use CodeIgniter\Router\RouteCollection;

/** @var RouteCollection $routes */

/*
 * --------------------------------------------------------------------
 * APIs Route Definitions
 * --------------------------------------------------------------------
 */

$routes->post('auth/jwt', '\App\Controllers\Sistema\AuthAPIController::jwtLogin');

$routes->group(
    'api',
    [
        'namespace' => 'App\Controllers\API',
        'filter' => 'jwt'
    ],
    static function ($routes) {

        $routes->post("calcular", 'ImprimelibrosApi::calcular');
        $routes->post("guardar", 'ImprimelibrosApi::guardar');
        // ...
    }
);