summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/utils/GeneratePassword.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/src/utils/GeneratePassword.js')
-rw-r--r--apps/files_sharing/src/utils/GeneratePassword.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_sharing/src/utils/GeneratePassword.js b/apps/files_sharing/src/utils/GeneratePassword.js
index f3122de1644..c383e96fdfa 100644
--- a/apps/files_sharing/src/utils/GeneratePassword.js
+++ b/apps/files_sharing/src/utils/GeneratePassword.js
@@ -22,6 +22,7 @@
import axios from '@nextcloud/axios'
import Config from '../services/ConfigService'
+import { showError, showSuccess } from '@nextcloud/dialogs'
const config = new Config()
const passwordSet = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789'
@@ -39,10 +40,12 @@ export default async function() {
try {
const request = await axios.get(config.passwordPolicy.api.generate)
if (request.data.ocs.data.password) {
+ showSuccess(t('files_sharing', 'Password created successfully'))
return request.data.ocs.data.password
}
} catch (error) {
console.info('Error generating password from password_policy', error)
+ showError(t('files_sharing', 'Error generating password from password_policy'))
}
}