Explorar el Código

Fixing method in users.js didn't have check userId

Sam X. Chen hace 5 años
padre
commit
a37723f8a4
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      models/users.js

+ 1 - 0
models/users.js

@@ -541,6 +541,7 @@ Users.mutations({
 Meteor.methods({
   setUsername(username, userId) {
     check(username, String);
+    check(userId, String);
     const nUsersWithUsername = Users.find({ username }).count();
     if (nUsersWithUsername > 0) {
       throw new Meteor.Error('username-already-taken');