Skip to content

Commit 58998cf

Browse files
committed
fix: update username mfa
1 parent 5a668ad commit 58998cf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/actions/update-username/request.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@ const { ActionTransport } = require('@microfleet/plugin-router');
22

33
const { requestUsernameUpdate } = require('../../utils/update-username');
44
const { resolveUserId } = require('../../utils/userData');
5-
const { checkMFA } = require('../../utils/mfa');
65
const isActive = require('../../utils/is-active');
76
const isBanned = require('../../utils/is-banned');
87
const {
98
ErrorConflictUserExists,
109
ErrorUserNotFound,
11-
MFA_TYPE_OPTIONAL,
1210
USERS_ID_FIELD,
1311
} = require('../../constants');
1412

@@ -49,6 +47,4 @@ module.exports = async function requestUpdateUsernameAction(request) {
4947
);
5048
};
5149

52-
module.exports.mfa = MFA_TYPE_OPTIONAL;
53-
module.exports.allowed = checkMFA;
5450
module.exports.transports = [ActionTransport.amqp, ActionTransport.internal];

src/actions/update-username/update.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
const { ActionTransport } = require('@microfleet/plugin-router');
22

3+
const { checkMFA } = require('../../utils/mfa');
34
const { updateUsernameWithToken } = require('../../utils/update-username');
5+
const { MFA_TYPE_OPTIONAL } = require('../../constants');
46

57
/**
68
* @api {amqp} <prefix>.update-username Update Username
@@ -20,4 +22,6 @@ module.exports = async function updateUsernameAction(request) {
2022
await updateUsernameWithToken(this, token, username);
2123
};
2224

25+
module.exports.mfa = MFA_TYPE_OPTIONAL;
26+
module.exports.allowed = checkMFA;
2327
module.exports.transports = [ActionTransport.amqp, ActionTransport.internal];

0 commit comments

Comments
 (0)