<?php

namespace App\Controllers;

class Home extends BaseController
{
    public function index(): string
    {
        return view('welcome_message');
    }

    public  function promoIndex($promo,$promoOwner=''):string{
        $in["promo"] = $promo;
        $in["promo_owner"] = $promoOwner;
        $out  = $this->APIcall('POST', $this->wrenchApiServer(). 'start',$in);
        $out["promo"] = $promo;
        $out["promo_owner"] = $promoOwner;

       // var_dump($out);
        $out["task"]  = $this->APIcall('POST', $this->wrenchApiServer(). 'tasks',$in)["result_list"];
        return view('welcome_message', $out);
    }
}
