Skip to content

Instantly share code, notes, and snippets.

@kauemurakami
Created June 1, 2020 18:09
Show Gist options
  • Save kauemurakami/7375bdf530a92de6edc6521e91108cce to your computer and use it in GitHub Desktop.
Save kauemurakami/7375bdf530a92de6edc6521e91108cce to your computer and use it in GitHub Desktop.
adicinando um registro
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