Skip to content

Commit 647b8e6

Browse files
authored
Fixes incorrect field access (#184)
1 parent 951da1d commit 647b8e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/user/create.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ module.exports = function (User) {
1818
if (data.email !== undefined) {
1919
data.email = String(data.email).trim();
2020
}
21-
if (data.accounttype !== undefined) {
22-
data.accounttype = data.accounttype.trim();
21+
if (data['account-type'] !== undefined) {
22+
data.accounttype = data['account-type'].trim();
2323
}
2424

2525
await User.isDataValid(data);

0 commit comments

Comments
 (0)