Page MenuHomePhorge

No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None
diff --git a/src/components/password_reset/password_reset.js b/src/components/password_reset/password_reset.js
index 2f6caafb3a..b2e6e10933 100644
--- a/src/components/password_reset/password_reset.js
+++ b/src/components/password_reset/password_reset.js
@@ -1,71 +1,70 @@
import { mapState as mapPiniaState } from 'pinia'
import { mapState } from 'vuex'
-import { resetPassword } from 'src/api/public.js'
-
import { useInstanceStore } from 'src/stores/instance.js'
+import { resetPassword } from 'src/api/public.js'
+
import { library } from '@fortawesome/fontawesome-svg-core'
import { faTimes } from '@fortawesome/free-solid-svg-icons'
library.add(faTimes)
const passwordReset = {
data: () => ({
user: {
email: '',
},
isPending: false,
success: false,
throttled: false,
error: null,
}),
computed: {
...mapState({
signedIn: (state) => !!state.users.currentUser,
}),
- ...mapPiniaState(useInstanceStore, ['server', 'mailerEnabled']),
+ ...mapPiniaState(useInstanceStore, ['mailerEnabled']),
},
created() {
if (this.signedIn) {
this.$router.push({ name: 'root' })
}
},
props: {
passwordResetRequested: {
default: false,
type: Boolean,
},
},
methods: {
dismissError() {
this.error = null
},
submit() {
this.isPending = true
const email = this.user.email
- const server = this.server
resetPassword({ email })
.then(({ status }) => {
this.isPending = false
this.user.email = ''
if (status === 204) {
this.success = true
this.error = null
} else if (status === 429) {
this.throttled = true
this.error = this.$t('password_reset.too_many_requests')
}
})
.catch(() => {
this.isPending = false
this.user.email = ''
this.error = this.$t('general.generic_error')
})
},
},
}
export default passwordReset

File Metadata

Mime Type
text/x-diff
Expires
Tue, Oct 13, 9:18 PM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1786907
Default Alt Text
(2 KB)

Event Timeline