Backend camel case

This commit is contained in:
Daniel Cojocea committed 2024-07-22 12:45:33 -04:00
1 parent c5b56dbc2b
commit 84613bc0e4
2 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -3,11 +3,11 @@ const bcrypt = require("bcrypt");
const UserSchema = mongoose.Schema(
{
firstname: {
firstName: {
type: String,
required: true,
},
lastname: {
lastName: {
type: String,
required: true,
},
+4 -4
View File
@@ -28,11 +28,11 @@ const loginValidation = joi.object({
});
const registerValidation = joi.object({
firstname: joi
firstName: joi
.string()
.required()
.pattern(/^[A-Za-z]+$/),
lastname: joi
lastName: joi
.string()
.required()
.pattern(/^[A-Za-z]+$/),
@@ -53,8 +53,8 @@ const editUserParamValidation = joi.object({
});
const editUserBodyValidation = joi.object({
firstname: joi.string().pattern(/^[A-Za-z]+$/),
lastname: joi.string().pattern(/^[A-Za-z]+$/),
firstName: joi.string().pattern(/^[A-Za-z]+$/),
lastName: joi.string().pattern(/^[A-Za-z]+$/),
profileImage: joi.any(),
newPassword: joi
.string()