fix api urls
This commit is contained in:
@@ -36,7 +36,7 @@ class ElixFormsApiClient
|
||||
}
|
||||
$queryParts[] = 'moduleTag=' . rawurlencode($moduleTag);
|
||||
|
||||
$url = $this->baseUrl . '/eF/api/request/lookup/by-status?' . implode('&', $queryParts);
|
||||
$url = "{$this->baseUrl}/api/request/lookup/by-status?" . implode('&', $queryParts);
|
||||
$payload = $this->getJson($url, $authToken, $username, 'LookupByStatus');
|
||||
$requests = $payload['value']['requests'] ?? [];
|
||||
|
||||
@@ -65,7 +65,7 @@ class ElixFormsApiClient
|
||||
}
|
||||
|
||||
$url = \sprintf(
|
||||
'%s/eF/services/api/request/%s/view/_DEFAULT/exportTags/get/v1?moduleTag=%s&exportGroup=%s',
|
||||
'%s/services/api/request/%s/view/_DEFAULT/exportTags/get/v1?moduleTag=%s&exportGroup=%s',
|
||||
$this->baseUrl,
|
||||
rawurlencode((string) $requestId),
|
||||
rawurlencode($moduleTag),
|
||||
|
||||
@@ -23,7 +23,8 @@ class ElixFormsAuthenticationClient {
|
||||
* @throws ElixFormsException Se le credenziali sono errate o c'è un errore server
|
||||
*/
|
||||
public function login(string $username, string $password): string {
|
||||
$url = $this->baseUrl . '/eF/services/api/authentication/login/v1';
|
||||
$this->baseUrl = rtrim($this->baseUrl,'/');
|
||||
$url = "{$this->baseUrl}/services/api/authentication/login/v1";
|
||||
|
||||
try {
|
||||
$response = $this->httpClient->post($url, [
|
||||
@@ -64,7 +65,7 @@ class ElixFormsAuthenticationClient {
|
||||
* @throws ElixFormsException Se c'è un errore durante il logout
|
||||
*/
|
||||
public function logout(string $username, string $token): bool {
|
||||
$url = $this->baseUrl . '/eF/services/api/authentication/' . urlencode($username) . '/logout/v1';
|
||||
$url = "{$this->baseUrl}/services/api/authentication/" . urlencode($username) . '/logout/v1';
|
||||
|
||||
try {
|
||||
$response = $this->httpClient->post($url, [
|
||||
|
||||
Reference in New Issue
Block a user