From 0d8b20e9402ca082ccea0989f7e4799d50702a75 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 26 Sep 2024 22:44:40 -0400 Subject: [PATCH] learn more page --- www-api/app/Config/RoutesV1.php | 2 ++ www-api/app/Controllers/WrenchFaq.php | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/www-api/app/Config/RoutesV1.php b/www-api/app/Config/RoutesV1.php index 0784cb8d..6c33b7a2 100644 --- a/www-api/app/Config/RoutesV1.php +++ b/www-api/app/Config/RoutesV1.php @@ -19,6 +19,8 @@ $routes->post('/en/wrench/api/v1/authstart', 'WrenchOauth::apigate'); $routes->post('/en/wrench/api/v1/faq', 'WrenchFaq::apigate'); $routes->post('/en/wrench/api/v1/faqdata', 'WrenchFaq::apigate'); $routes->post('/en/wrench/api/v1/helpdata', 'WrenchFaq::helpgate'); +$routes->post('/en/wrench/api/v1/learnmore', 'WrenchFaq::learnMoreUser'); + $routes->post('/en/wrench/api/v1/apigate', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/generics', 'WrenchApi::apigate'); diff --git a/www-api/app/Controllers/WrenchFaq.php b/www-api/app/Controllers/WrenchFaq.php index c639723b..f7ea0c09 100644 --- a/www-api/app/Controllers/WrenchFaq.php +++ b/www-api/app/Controllers/WrenchFaq.php @@ -12,6 +12,33 @@ class WrenchFaq extends BaseController protected $db; public $con_name = 'wrench_blog'; + public function learnMoreUser(){ + $total = 4; + $data=[]; + $raw_json = file_get_contents('php://input'); + $in = json_decode($raw_json, true); + + for ($i = 0; $i < $total; $i++) { + + $msg=''; + $msgS = "
Random gibberish text to use in web pages, site templates and in typography demos. + Get rid of Lorem Ipsum forever. A tool for web designers who want to save time.
"; + + $txL = rand(1,5); + for($ii=1; $ii<$txL; $ii++){ + $msg = $msg.$msgS; + } + + $data["result_list"][] = array( + "uid" => '0000-0000-0000-000'. $i, + "topic" => "Topic ".$i, + "contents" => $msg + ); + } + + return $this->summaryReturnData($in,$data); //json_encode( $final_out ); + } + public function apigate(){ return json_encode( $this->apiData() ); }