27 lines
703 B
PHP
27 lines
703 B
PHP
<?php
|
|
|
|
namespace App\Controllers;
|
|
|
|
class Home extends BaseController
|
|
{
|
|
public function index(): string
|
|
{
|
|
return view('welcome_message');
|
|
}
|
|
|
|
public function promoIndex($promo,$promoOwner=''):string{
|
|
// echo $promo;
|
|
// echo $promoOwner;
|
|
//http://10.204.5.100:9083/en/promo/api/v1/start
|
|
|
|
// echo $backend_server = getenv("API_ENDPOINT");
|
|
|
|
$in["promo"] = $promo;
|
|
$in["promo_owner"] = $promoOwner;
|
|
$out = $this->APIcall('POST', $this->wrenchApiServer(). 'start',$in);
|
|
$out["task"] = $this->APIcall('POST', $this->wrenchApiServer(). 'tasks',$in);
|
|
//var_dump($out);
|
|
return view('welcome_message', $out);
|
|
}
|
|
}
|