Merge pull request #6034 from aternatik/api_rest_allow_post

FIX Minor fixes for REST API
This commit is contained in:
Laurent Destailleur 2016-11-27 15:10:03 +01:00 committed by GitHub
commit 1e647b082c
2 changed files with 12 additions and 12 deletions

View File

@ -45,6 +45,9 @@ class GenericApi extends DolibarrApi
* @return array Response status and user token * @return array Response status and user token
* *
* @throws RestException * @throws RestException
*
* @url POST /login
* @url GET /login
*/ */
public function login($login, $password, $entity=0, $reset=0) { public function login($login, $password, $entity=0, $reset=0) {

View File

@ -26,6 +26,7 @@
* *
*/ */
if (! defined("NOLOGIN")) define("NOLOGIN",'1'); if (! defined("NOLOGIN")) define("NOLOGIN",'1');
if (! defined("NOCSRFCHECK")) define("NOCSRFCHECK",'1');
$res=0; $res=0;
if (! $res && file_exists("../main.inc.php")) $res=include '../main.inc.php'; if (! $res && file_exists("../main.inc.php")) $res=include '../main.inc.php';
@ -142,7 +143,3 @@ foreach ($modulesdir as $dir)
// Call API (we suppose we found it) // Call API (we suppose we found it)
$api->r->handle(); $api->r->handle();