mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 01:48:50 +00:00
Integrated API tokens
This commit is contained in:
parent
cd49889614
commit
2bfb6fd7d1
@ -16,6 +16,10 @@ ComunicWeb.common.api.makeAPIrequest = function(apiURI, params, requireLoginToke
|
||||
//Prepare the request URL
|
||||
var requestURL = ComunicWeb.__config.apiURL + apiURI;
|
||||
|
||||
//Add API service tokens
|
||||
params.serviceName = ComunicWeb.__config.apiServiceName;
|
||||
params.serviceToken = ComunicWeb.__config.apiServiceToken;
|
||||
|
||||
//Add login tokens to params if required
|
||||
if(requireLoginTokens){
|
||||
//Get login tokens
|
||||
|
@ -13,5 +13,5 @@ $config['siteURL'] = "http://devweb.local/comunic/v2/";
|
||||
|
||||
//API config
|
||||
$config['API_URL'] = "http://devweb.local/comunic/api/";
|
||||
$config['API_SERVICE_NAME'] = "testService";
|
||||
$config['API_SERVICE_TOKEN'] = "testPasswd";
|
||||
$config['API_SERVICE_NAME'] = "ComunicWeb";
|
||||
$config['API_SERVICE_TOKEN'] = "12XU67pJUlnNQ";
|
@ -72,8 +72,10 @@
|
||||
//Site URL
|
||||
siteURL: "<?php echo config['siteURL']; ?>",
|
||||
|
||||
//apiURL
|
||||
//apiURL and credentials
|
||||
apiURL: "<?php echo config['API_URL']; ?>",
|
||||
apiServiceName: "<?php echo config['API_SERVICE_NAME']; ?>",
|
||||
apiServiceToken: "<?php echo config['API_SERVICE_TOKEN']; ?>",
|
||||
|
||||
//Default language
|
||||
defaultLanguage: "en",
|
||||
|
Loading…
Reference in New Issue
Block a user