finished user store in typscript

This commit is contained in:
canove
2020-09-14 18:54:36 -03:00
parent eba3553a2d
commit 7f33e33078
29 changed files with 260 additions and 133 deletions

View File

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