mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Remove old untranslated email 'sendResetPasswordEmail'
This commit is contained in:
parent
2d634b4111
commit
b68f550b6c
@ -1,32 +0,0 @@
|
|||||||
import { sendResetPasswordEmail } from './sendResetPasswordEmail'
|
|
||||||
import { sendEMail } from './sendEMail'
|
|
||||||
|
|
||||||
jest.mock('./sendEMail', () => {
|
|
||||||
return {
|
|
||||||
__esModule: true,
|
|
||||||
sendEMail: jest.fn(),
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('sendResetPasswordEmail', () => {
|
|
||||||
beforeEach(async () => {
|
|
||||||
await sendResetPasswordEmail({
|
|
||||||
link: 'resetLink',
|
|
||||||
firstName: 'Peter',
|
|
||||||
lastName: 'Lustig',
|
|
||||||
email: 'peter@lustig.de',
|
|
||||||
duration: '23 hours and 30 minutes',
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('calls sendEMail', () => {
|
|
||||||
expect(sendEMail).toBeCalledWith({
|
|
||||||
to: `Peter Lustig <peter@lustig.de>`,
|
|
||||||
subject: 'Gradido: Passwort zurücksetzen',
|
|
||||||
text:
|
|
||||||
expect.stringContaining('Hallo Peter Lustig') &&
|
|
||||||
expect.stringContaining('resetLink') &&
|
|
||||||
expect.stringContaining('23 Stunden und 30 Minuten'),
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
import { sendEMail } from './sendEMail'
|
|
||||||
import { resetPassword } from './text/resetPassword'
|
|
||||||
import CONFIG from '@/config'
|
|
||||||
|
|
||||||
export const sendResetPasswordEmail = (data: {
|
|
||||||
link: string
|
|
||||||
firstName: string
|
|
||||||
lastName: string
|
|
||||||
email: string
|
|
||||||
duration: string
|
|
||||||
}): Promise<boolean> => {
|
|
||||||
return sendEMail({
|
|
||||||
to: `${data.firstName} ${data.lastName} <${data.email}>`,
|
|
||||||
subject: resetPassword.de.subject,
|
|
||||||
text: resetPassword.de.text({ ...data, resendLink: CONFIG.EMAIL_LINK_FORGOTPASSWORD }),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
export const resetPassword = {
|
|
||||||
de: {
|
|
||||||
subject: 'Gradido: Passwort zurücksetzen',
|
|
||||||
text: (data: {
|
|
||||||
link: string
|
|
||||||
firstName: string
|
|
||||||
lastName: string
|
|
||||||
email: string
|
|
||||||
duration: string
|
|
||||||
resendLink: string
|
|
||||||
}): string =>
|
|
||||||
`Hallo ${data.firstName} ${data.lastName},
|
|
||||||
|
|
||||||
Du oder jemand anderes hat für dieses Konto ein Zurücksetzen des Passworts angefordert.
|
|
||||||
Wenn du es warst, klicke bitte auf den Link: ${data.link}
|
|
||||||
oder kopiere den obigen Link in Dein Browserfenster.
|
|
||||||
|
|
||||||
Der Link hat eine Gültigkeit von ${data.duration
|
|
||||||
.replace('hours', 'Stunden')
|
|
||||||
.replace('minutes', 'Minuten')
|
|
||||||
.replace(
|
|
||||||
' and ',
|
|
||||||
' und ',
|
|
||||||
)}. Sollte die Gültigkeit des Links bereits abgelaufen sein, kannst du dir hier einen neuen Link schicken lassen, in dem du deine E-Mail-Adresse eingibst:
|
|
||||||
${data.resendLink}
|
|
||||||
|
|
||||||
Mit freundlichen Grüßen,
|
|
||||||
dein Gradido-Team`,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user