Skip to content

Commit

Permalink
check for existance of userConnections cache in getUserConnectionStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
litsel-pitdyr committed Jan 10, 2025
1 parent 1a106a8 commit 158cff5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/controllers/proxyManagementController.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const getUserConnectionsStatus = async (req, res) => {
try {
const { shortcode } = req.params;
const cache = req.app.get('cache');
if (!cache.has(`${shortcode}-userConnections`)) {
return res.status(404).json({ message: `No ${shortcode}-userConnections cache exists` });
}
const userConnections = cache.get(`${shortcode}-userConnections`);
console.log(Object.fromEntries(userConnections));

Expand Down

0 comments on commit 158cff5

Please sign in to comment.