afrokick 6 years ago
parent
commit
7e2b854f09
1 changed files with 2 additions and 2 deletions
  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();
   }