mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
d2e8b01e30
- Added new core controller core/RESTFul_Controller.php that extends REST_Controller and partially overrides part of the latter - Changed application/config/rest.php to keep the minimal useful set of configs - Controllers core/APIv1_Controller, controllers/api/v1/CheckUserAuth.php and controllers/api/v1/Test.php now extend core/RESTFul_Controller - Changed method _remap interface for core/APIv1_Controller - Removed application/core/REST_Controller.php - Removed application/libraries/Format.php - Removed application/language/english/rest_controller_lang.php
34 lines
686 B
PHP
34 lines
686 B
PHP
<?php
|
|
|
|
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/**
|
|
* Testing class for REST calls and authentication
|
|
*/
|
|
class Test extends RESTFul_Controller
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
|
|
// Loads helper message to manage returning messages
|
|
$this->load->helper('hlp_return_object');
|
|
}
|
|
|
|
/**
|
|
* Test HTTP GET method
|
|
*/
|
|
public function getTest()
|
|
{
|
|
$this->response(success('API HTTP GET call test succeed'), REST_Controller::HTTP_OK);
|
|
}
|
|
|
|
/**
|
|
* Test HTTP POST method
|
|
*/
|
|
public function postTest()
|
|
{
|
|
$this->response(success('API HTTP POST call test succeed'), REST_Controller::HTTP_OK);
|
|
}
|
|
}
|