refactor(socket.io): deprecate SocketModules.chats.hasPrivateChat in favour of api.users.getPrivateRoomId

This commit is contained in:
Julian Lam
2023-11-13 16:10:40 -05:00
parent a4133500fe
commit 0d3c94e6bb
7 changed files with 52 additions and 2 deletions

View File

@@ -77,6 +77,10 @@ Users.checkStatus = async (req, res) => {
helpers.formatApiResponse(current === status ? 200 : 404, res);
};
Users.getPrivateRoomId = async (req, res) => {
helpers.formatApiResponse(200, res, await api.users.getPrivateRoomId(req, { ...req.params }));
};
Users.updateSettings = async (req, res) => {
const settings = await api.users.updateSettings(req, { ...req.body, uid: req.params.uid });
helpers.formatApiResponse(200, res, settings);