<?php

use Mango\Controllers\Api\TasksApi;

$defaultArgs = [
    'methods' => 'GET'    
];

/*
* API routes
* Example entry: 'METHODS:api/route' => [__::class, 'method@permissionMethod'],
* Methods: GET, POST, PUT, DELETE (optional)
* Permission: classMethod@permission (optional)
*/

$routes = [
    'mango' =>  [
            'v1' => [
                'POST:tasks' => [TasksApi::class, 'create'],
                'GET:tasks/list' => [TasksApi::class, 'list'],                
            ]
        ]
    ];

mango_registry_set('admin.routes.api', $routes);