feat: send auth status
This commit is contained in:
@@ -108,14 +108,11 @@ router.get('/config', requireSignIn, async (req: AuthenticatedRequest, res: Resp
|
|||||||
return res.status(404).json({ message: 'User not found' });
|
return res.status(404).json({ message: 'User not found' });
|
||||||
}
|
}
|
||||||
|
|
||||||
const decryptedProxyUrl = user.proxy_url ? decrypt(user.proxy_url) : null;
|
const auth = user.proxy_username && user.proxy_password ? true : false
|
||||||
const decryptedProxyUsername = user.proxy_username ? decrypt(user.proxy_username) : null;
|
|
||||||
const decryptedProxyPassword = user.proxy_password ? decrypt(user.proxy_password) : null;
|
|
||||||
|
|
||||||
res.status(200).json({
|
res.status(200).json({
|
||||||
proxy_url: decryptedProxyUrl,
|
proxy_url: decryptedProxyUrl,
|
||||||
proxy_username: decryptedProxyUsername,
|
auth: auth,
|
||||||
proxy_password: decryptedProxyPassword,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user