Ver Fonte

fix auth

afrokick há 6 anos atrás
pai
commit
7e2b854f09
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/api/middleware/auth/index.js

+ 2 - 2
src/api/middleware/auth/index.js

@@ -9,9 +9,9 @@ module.exports = (req, res, next) => {
     return next();
   }
 
-  const client = realm.getRealmByKey(id);
+  const client = realm.getClientById(id);
 
-  if (!realm) {
+  if (!client) {
     return sendAuthError();
   }