Merge branch 'appVersion'

This commit is contained in:
brantje 2016-12-27 13:15:05 +01:00
commit e402602256
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
2 changed files with 6 additions and 3 deletions

View file

@ -65,10 +65,11 @@ return [
['name' => 'share#getItemAcl', 'url' => '/api/v2/sharing/credential/{item_guid}/acl', 'verb' => 'GET'],
['name' => 'share#getFile', 'url' => '/api/v2/sharing/credential/{item_guid}/file/{file_guid}', 'verb' => 'GET'],
['name' => 'share#updateSharedCredentialACL', 'url' => '/api/v2/sharing/credential/{item_guid}/acl', 'verb' => 'PATCH'],
['name' => 'internal#getAppVersion', 'url' => '/api/v2/version', 'verb' => 'GET'],
//Translations
['name' => 'translation#getLanguageStrings', 'url' => '/api/v2/language', 'verb' => 'GET'],
['name' => 'translation#getLanguageStrings', 'url' => '/api/v2/language', 'verb' => 'GET'],
//Internal API
['name' => 'internal#remind', 'url' => '/api/internal/notifications/remind/{credential_id}', 'verb' => 'POST'],

View file

@ -15,7 +15,7 @@ use OCP\IRequest;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\ApiController;
use OCA\Passman\Service\CredentialService;
use \OCP\App;
class InternalController extends ApiController {
private $userId;
@ -65,9 +65,11 @@ class InternalController extends ApiController {
/**
* @NoAdminRequired
* @NoCSRFRequired
*/
public function getAppVersion() {
return new JSONResponse(array('version' => '1.0.2.25'));
$AppInstance = new App();
return new JSONResponse(array('version' => $AppInstance->getAppInfo("passman")["version"]));
}
/**