refactor: using property assignment
This commit is contained in:
3505
package-lock.json
generated
Normal file
3505
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user