api route
This commit is contained in:
@@ -37,6 +37,9 @@ $routes->set404Override();
|
|||||||
// route since we don't have to scan directories.
|
// route since we don't have to scan directories.
|
||||||
//www-api/app/Config/RoutesV1.php
|
//www-api/app/Config/RoutesV1.php
|
||||||
|
|
||||||
|
$routes->post('/en/promo/api/v1/start', 'Promo::promoStart');
|
||||||
|
$routes->post('/en/promo/api/v1/tasks', 'Promo::promoTask');
|
||||||
|
|
||||||
|
|
||||||
$routes->get('/en/flow/api/v1/new-account', 'AirFlow::flowNewAccount');
|
$routes->get('/en/flow/api/v1/new-account', 'AirFlow::flowNewAccount');
|
||||||
$routes->get('/en/flow/api/v1/offer-pending', 'AirFlow::flowOfferPending');
|
$routes->get('/en/flow/api/v1/offer-pending', 'AirFlow::flowOfferPending');
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
class Promo extends BaseController
|
||||||
|
{
|
||||||
|
|
||||||
|
public function promoStart(){
|
||||||
|
|
||||||
|
$raw_json = file_get_contents('php://input');
|
||||||
|
$in = json_decode($raw_json, true);
|
||||||
|
$out =[];
|
||||||
|
|
||||||
|
log_message('critical', "promoStart::promoStart ********* ALL ".serialize($in) );
|
||||||
|
$in["loc"] = $_SERVER["REMOTE_ADDR"];
|
||||||
|
// $in['action'] = WRENCHBOARD_MARKET_PLAN01_START;
|
||||||
|
$in['limit'] = 10;
|
||||||
|
// $ret['WRENCHBOARD_MARKET_PLAN01_START'] = (new \App\Models\BackendModel())->wrenchboard_api($in, $out);
|
||||||
|
return []; //json_encode( $final_out );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function promoTask(){
|
||||||
|
|
||||||
|
$raw_json = file_get_contents('php://input');
|
||||||
|
$in = json_decode($raw_json, true);
|
||||||
|
$out =[];
|
||||||
|
|
||||||
|
log_message('critical', "promoTask::promoStart ********* ALL ".serialize($in) );
|
||||||
|
$in["loc"] = $_SERVER["REMOTE_ADDR"];
|
||||||
|
// $in['action'] = WRENCHBOARD_MARKET_PLAN01_START;
|
||||||
|
$in['limit'] = 10;
|
||||||
|
// $ret['WRENCHBOARD_MARKET_PLAN01_START'] = (new \App\Models\BackendModel())->wrenchboard_api($in, $out);
|
||||||
|
return []; //json_encode( $final_out );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user