- npm added @japa/api-client, @japa/assert, @types/supertest
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m13s
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m13s
- webpack added opions['__VUE_PROD_HYDRATION_MISMATCH_DETAILS__'] = false; - bodyparser config replaced whitelistedMethods with allowedMethods - extended stardust_provider - adapted tests for adonisjs v6
This commit is contained in:
parent
296c8fd46e
commit
bee76f8d5b
23 changed files with 2014 additions and 165 deletions
|
@ -88,13 +88,17 @@ export default class UserController {
|
|||
}
|
||||
|
||||
public async disableTwoFactorAuthentication({ auth, response, session }: HttpContext): Promise<void> {
|
||||
const user = auth.user;
|
||||
const user: User | undefined = auth.user;
|
||||
|
||||
user.twoFactorSecret = null;
|
||||
user.twoFactorRecoveryCodes = null;
|
||||
await user.save();
|
||||
|
||||
session.flash('message', 'Two factor authentication disabled.');
|
||||
if (user) {
|
||||
user.twoFactorSecret = null;
|
||||
user.twoFactorRecoveryCodes = null;
|
||||
await user.save();
|
||||
session.flash('message', 'Two-factor authentication disabled.');
|
||||
} else {
|
||||
session.flash('error', 'User not found.');
|
||||
}
|
||||
|
||||
return response.redirect().back();
|
||||
// return inertia.render('Auth/AccountInfo', {
|
||||
// // status: {
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue