blog data

This commit is contained in:
CHIEFSOFT\ameye
2023-06-29 23:29:39 -04:00
parent 1416d152cd
commit 750dd6b43b
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ $routes->get('/en/wrench/api/v1/blogdata/', 'WrenchBlog::website');
$routes->get('/en/wrench/api/v1/blogdata/(:any)', 'WrenchBlog::blogLimitedData/$1');
$routes->post('/en/wrench/api/v1/blogdata/', 'WrenchBlog::website');
$routes->post('/en/wrench/api/v1/blogdata/(:any)', 'WrenchBlog::blogLimitedData/$1');
//$routes->post('/en/wrench/api/v1/blogdata/(:any)', 'WrenchBlog::blogLimitedData/$1');
+9
View File
@@ -66,7 +66,16 @@ class WrenchBlog extends BaseController
}
public function website(){
$endpoint = "WRENCH_BLOG_DATA";
$res1 = $this->getCache($endpoint);
if (count($res1)==0){
$rawData = $this->apiData();
$res1= $rawData['payload']; //[0]['payload'];
$this->saveCache($endpoint,$res1);
}
return $this->response->setJson($res1);
}
public function blogLimitedData($inData){