const Chat = require('./schemas/chat'); const getByField = async (companionId, userId) => { const chat = await Chat.findOne({ companionId, owner: userId, }); return chat; }; module.exports = { getByField, };