blog data
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user