Minor code refactoring

This commit is contained in:
emad-salah 2020-07-10 12:39:08 +01:00
parent 1d0a4629f6
commit 17da950df9

View file

@ -372,7 +372,7 @@ module.exports = async (
const authorizedDevice = await Encryption.authorizeDevice({ deviceId, publicKey })
logger.info(authorizedDevice)
return res.status(200).json(authorizedDevice)
return res.json(authorizedDevice)
} catch (err) {
logger.error(err)
return res.status(401).json({
@ -1416,7 +1416,7 @@ module.exports = async (
return res.status(400).json(err);
}
return res.status(200).json(data);
return res.json(data);
});
});
@ -1430,7 +1430,7 @@ module.exports = async (
return res.status(400).json(err);
}
return res.status(200).json(data);
return res.json(data);
});
});