change service names

This commit is contained in:
canove
2020-09-19 21:16:07 -03:00
parent 2bf5caadce
commit 5b54c4df41
4 changed files with 8 additions and 8 deletions

View File

@@ -1,17 +0,0 @@
import Contact from "../../models/Contact";
import AppError from "../../errors/AppError";
const ShowContactService = async (id: string): Promise<Contact> => {
const user = await Contact.findOne({
where: { id },
attributes: ["id", "name", "number", "email"]
});
if (!user) {
throw new AppError("No contact found with this ID.", 404);
}
return user;
};
export default ShowContactService;