afrokick 6 жил өмнө
parent
commit
7e2b854f09

+ 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();
   }