changed all models to typescript

This commit is contained in:
canove
2020-09-19 08:15:47 -03:00
parent b04c0b878e
commit 99fa2cea61
22 changed files with 629 additions and 162 deletions

View File

@@ -2,15 +2,13 @@ import { Request, Response } from "express";
import AuthUserService from "../services/UserServices/AuthUserSerice";
const store = async (req: Request, res: Response): Promise<Response> => {
export const store = async (req: Request, res: Response): Promise<Response> => {
const { email, password } = req.body;
const { user, token } = await AuthUserService({ email, password });
const { token, user } = await AuthUserService({ email, password });
return res.status(200).json({
user,
token
});
};
export default store;