Created
June 1, 2020 18:09
-
-
Save kauemurakami/7375bdf530a92de6edc6521e91108cce to your computer and use it in GitHub Desktop.
adicinando um registro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const addUser = async (req: Request, res: Response) => { | |
const body = await req.body() | |
const client: Client = body.value | |
//console.log(client) | |
const { name, email, password } = body.value | |
//await Client.create( body.value ) | |
await Client.create({ name: name, email: email, password: password }) | |
res.status(200).send({ client: client }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment