mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 12:19:16 +00:00
feat: handle group messages
This commit is contained in:
@@ -2,13 +2,13 @@ import Contact from "../../models/Contact";
|
||||
import AppError from "../../errors/AppError";
|
||||
|
||||
const ShowContactService = async (id: string | number): Promise<Contact> => {
|
||||
const user = await Contact.findByPk(id, { include: ["extraInfo"] });
|
||||
const contact = await Contact.findByPk(id, { include: ["extraInfo"] });
|
||||
|
||||
if (!user) {
|
||||
if (!contact) {
|
||||
throw new AppError("No contact found with this ID.", 404);
|
||||
}
|
||||
|
||||
return user;
|
||||
return contact;
|
||||
};
|
||||
|
||||
export default ShowContactService;
|
||||
|
||||
Reference in New Issue
Block a user