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,7 +1,7 @@
import Contact from "../../models/Contact";
import AppError from "../../errors/AppError";
const ShowContactService = async (id: string): Promise<Contact> => {
const FindContactService = async (id: string): Promise<Contact> => {
const user = await Contact.findOne({
where: { id },
attributes: ["id", "name", "number", "email"]
@@ -14,4 +14,4 @@ const ShowContactService = async (id: string): Promise<Contact> => {
return user;
};
export default ShowContactService;
export default FindContactService;

View File

@@ -1,7 +1,7 @@
import User from "../../models/User";
import AppError from "../../errors/AppError";
const ShowUserService = async (id: string): Promise<User | undefined> => {
const FindUserService = async (id: string): Promise<User | undefined> => {
const user = await User.findOne({
where: { id },
attributes: ["name", "id", "email", "profile"]
@@ -14,4 +14,4 @@ const ShowUserService = async (id: string): Promise<User | undefined> => {
return user;
};
export default ShowUserService;
export default FindUserService;