refactor: using property assignment

pull/44/head
Chris Benseler 2021-04-17 17:12:09 -03:00
parent 0d35bcfe38
commit 501f229d0e
3 changed files with 3511 additions and 6 deletions

3505
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -37,8 +37,8 @@ export default async function handler(req, res) {
const user = await prisma.user.create({
data: {
username: username,
email: email,
username,
email,
password: hashedPassword
}
});

View File

@ -25,16 +25,16 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const username = req.body.username;
const name = req.body.name;
const description = req.body.description;
const bio = req.body.description;
const updateUser = await prisma.user.update({
where: {
id: user.id,
},
data: {
username: username,
name: name,
bio: description
username,
name,
bio
},
});