<?php

use CodeIgniter\Router\RouteCollection;

/**
 * @var RouteCollection $routes
 */
$routes->get('/', 'Home::index');


$routes->post('/digibko/v1/identity/token',   'DigiFiAuth::startBkoToken');

$routes->get('/digibko/v1/identity/verify_token',   'DigiFiAuth::verifyGetBkoToken');
$routes->post('/digibko/v1/identity/verify_token',   'DigiFiAuth::verifyPostBkoToken');

$routes->get('/digibko/v1/dash',              'BkoDash::bkoDashHome');

$routes->get('/digibko/v1/loan/started',       'BkoReports::startedApplication');
$routes->get('/digibko/v1/loan/pending',       'BkoReports::pendingApplication');
$routes->get('/digibko/v1/loan/ready',         'BkoReports::readyApplication');
$routes->get('/digibko/v1/loan/approved',      'BkoReports::approvedApplication');
$routes->get('/digibko/v1/loan/rejected',      'BkoReports::rejectedApplication');

$routes->get('/digibko/v1/employers',              'BkoReports::employersList');

$routes->get('/digibko/v1/employers/signatory',              'BkoReports::signatoryList');
$routes->post('/digibko/v1/employers/signatory',              'BkoReports::signatoryAdd');

$routes->post('/digibko/v1/employers/verify',              'Employers::verifyEmployer');

$routes->get('/digibko/v1/users',              'BkoReports::listUsers');


$routes->post('/digibko/v1/employer',              'BkoReports::employerAdd');

/*
 * Processing the loan from back office
 */
$routes->post('/digibko/v1/loan/start-processing',      'Loan::startProcessing');

$routes->get('/digibko/v1/dashboard/bvn/recent',   'DigiFiAuth::startBkoToken');
//$routes->get('/digibko/v1/applications/pending',   'BkoReports::pendingApplication');

$routes->post('/digiusers/v1/bvn',                  'DigiFiBVN::startBVNVerify');
$routes->post('/digiusers/v1/bvn/verify',           'DigiFiBVN::completeBVNVerify');

$routes->get('/digiusers/v1/dash',                 'Users::userDash');
$routes->get('/digiusers/v1/profile',              'Users::userProfile');

$routes->get('/digiusers/v1/employers',              'BkoReports::employersList');

$routes->post('/digiusers/v1/loan/apply',           'Loan::loanApply');
$routes->get('/digiusers/v1/loan/loanlist',        'Loan::loanlist');


