Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorbrantje <brantje@gmail.com>2016-12-30 14:51:32 +0300
committerbrantje <brantje@gmail.com>2016-12-30 15:37:40 +0300
commit7bb18391848e9611a80d7832ca10068f229a4e17 (patch)
treeb8ea4cd476303736415330be6314c04c5d4dd353 /js
parent9b83946f0b47253ebac68918c18a62d24134d43e (diff)
Refactor settings, create SettingsService
Fix settings not working in ownCloud Signed-off-by: brantje <brantje@gmail.com>
Diffstat (limited to 'js')
-rw-r--r--js/app/services/settingsservice.js2
-rw-r--r--js/settings-admin.js8
2 files changed, 7 insertions, 3 deletions
diff --git a/js/app/services/settingsservice.js b/js/app/services/settingsservice.js
index 16cf4d29..7db91069 100644
--- a/js/app/services/settingsservice.js
+++ b/js/app/services/settingsservice.js
@@ -38,7 +38,7 @@
defaultVaultPass: null
};
- $http.get(OC.generateUrl('apps/passman/api/internal/settings')).then(function (response) {
+ $http.get(OC.generateUrl('apps/passman/api/v2/settings')).then(function (response) {
if (response.data) {
settings = angular.merge(settings, response.data);
$rootScope.$broadcast('settings_loaded');
diff --git a/js/settings-admin.js b/js/settings-admin.js
index 4adb8bb1..960753b2 100644
--- a/js/settings-admin.js
+++ b/js/settings-admin.js
@@ -60,7 +60,7 @@ $(document).ready(function () {
setAdminKey: function (key, value) {
var request = $.ajax({
- url: this._baseUrl + '/' + key + '/' + value,
+ url: this._baseUrl + '/' + key + '/' + value +'/admin1/admin2',
method: 'POST'
});
request.done(function () {
@@ -84,7 +84,7 @@ $(document).ready(function () {
};
- var settings = new Settings(OC.generateUrl('apps/passman/api/internal/settings'));
+ var settings = new Settings(OC.generateUrl('apps/passman/api/v2/settings'));
settings.load();
// ADMIN SETTINGS
@@ -121,4 +121,8 @@ $(document).ready(function () {
settings.setAdminKey('vault_key_strength', $(this).val());
});
+ if($('form[name="passman_settings"]').length === 2){
+ $('form[name="passman_settings"]')[1].remove();
+ }
+
});