diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ff508da4307f20f5d2c4511543e8851ec690771..c39c8e9944954f2cede5c61ad25c55adf1e5f6ba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,7 @@ include: - - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: main - file: 'nc-apps-checkout-deploy.yml' + file: "nc-apps-lint-build-frontend.yml" + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" + ref: main + file: "nc-apps-deploy.yml" diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index 057ebc0291864a5964bfe30fe9699da595102b6b..70b991f86aee50c0e5d4e154a27533efaa1db3a7 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -131,12 +131,8 @@ class UserService 'uid' => $userID, 'email' => $email ]; - - $headers = array( - 'Content-Type: application/json' - ); - $answer = $this->curl->post($postDeleteUrl, $params, $headers); + $answer = $this->curl->post($postDeleteUrl, $params); return json_decode($answer, true); } catch (\Exception $e) { diff --git a/package-lock.json b/package-lock.json index 898bc15534585a161f16122fdc54ad8962bb479d..c5df651bdf7c27a2dda842cae965785ced291221 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,6 @@ "@nextcloud/password-confirmation": "^1.0.1", "@nextcloud/router": "^2.0.0", "@nextcloud/vue": "^5.4.0", - "lodash": "^4.17.21", "vue": "^2.7.8" }, "devDependencies": { diff --git a/package.json b/package.json index c220e461099a2fe3bcdea7f665621c611d9e4881..a5515beb7239ebfd95e32d539226b717412884ff 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "@nextcloud/password-confirmation": "^1.0.1", "@nextcloud/router": "^2.0.0", "@nextcloud/vue": "^5.4.0", - "lodash": "^4.17.21", "vue": "^2.7.8" }, "browserslist": [ diff --git a/src/PersonalSettings.vue b/src/PersonalSettings.vue index 7916b0f30764ef0348c3f96ae54da4a5723d41cc..9f2a106763d06df5e3e8c11e0364e459ae06b22b 100644 --- a/src/PersonalSettings.vue +++ b/src/PersonalSettings.vue @@ -66,7 +66,6 @@ import SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection.js' import Axios from '@nextcloud/axios' import { generateUrl } from '@nextcloud/router' import { showError } from '@nextcloud/dialogs' -import { debounce } from 'lodash' export default { name: 'PersonalSettings', @@ -113,7 +112,7 @@ export default { this.enableDeleteAccountEvent() } }, - enableDeleteAccountEvent() { + enableDeleteAccountEvent() { const elem = document.getElementById('body-settings') const event = new Event('enable-delete-account') elem.dispatchEvent(event) @@ -166,14 +165,14 @@ export default { const { status, data } = await Axios.post(url, { shopEmailPostDelete: this.shopEmailPostDelete, }) - return { status, data} + return { status, data } } catch (err) { - return { status: err.response.status, data: err.response.data} + return { status: err.response.status, data: err.response.data } } }, - updateEmailPostDelete: async function(event) { - if(document.activeElement === event.target) { - return; + async updateEmailPostDelete(event) { + if (document.activeElement === event.target) { + return } if (this.shopEmailPostDelete === this.userEmail) { showError( @@ -183,13 +182,13 @@ export default { ) ) } else { - const { status, data} = await this.callAPIToUpdateEmail() + const { status, data } = await this.callAPIToUpdateEmail() if (status !== 200) { this.disableDeleteAccountEvent() showError( t( 'ecloud-accounts', - data['message'] + data.message ) ) } else { diff --git a/src/delete-account-listeners.js b/src/delete-account-listeners.js index 09b6c4f217bf7bdd367e8973d9a3cf5d87542efa..42046a3cf41668f1239e146c740078cea0dd61fc 100644 --- a/src/delete-account-listeners.js +++ b/src/delete-account-listeners.js @@ -1,5 +1,9 @@ /* global $ */ $(document).ready(function() { + // Disable initially + $('#drop_account_confirm').prop('disabled', true) + $('#deleteaccount').prop('disabled', true) + const elem = document.getElementById('body-settings') elem.addEventListener('disable-delete-account', function() { $('#deleteaccount').prop('disabled', true)