Skip to content

Commit

Permalink
User profile picture make optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Md-Rubel-Ahmed-Rana committed Jul 8, 2024
1 parent a63b5ff commit d5eb25e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 5 deletions.
8 changes: 8 additions & 0 deletions backend/dist/models/user.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const userSchema = new mongoose_1.Schema({
},
profile_picture: {
type: String,
required: false,
},
email: {
type: String,
Expand All @@ -15,24 +16,31 @@ const userSchema = new mongoose_1.Schema({
},
department: {
type: String,
required: true,
},
designation: {
type: String,
required: true,
},
phoneNumber: {
type: String,
required: false,
},
permanentAddress: {
type: String,
required: false,
},
presentAddress: {
type: String,
required: false,
},
country: {
type: String,
required: false,
},
password: {
type: String,
required: true,
},
}, {
timestamps: true,
Expand Down
2 changes: 1 addition & 1 deletion backend/dist/validations/user.validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const registerZodSchema = zod_1.z.object({
body: zod_1.z
.object({
name: zod_1.z.string().min(1).max(255),
profile_picture: zod_1.z.string(),
profile_picture: zod_1.z.string().optional(),
email: zod_1.z.string().email(),
department: zod_1.z.string().min(1).max(255),
designation: zod_1.z.string().min(1).max(255),
Expand Down
8 changes: 8 additions & 0 deletions backend/src/models/user.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const userSchema = new Schema<IUser>(
},
profile_picture: {
type: String,
required: false,
},
email: {
type: String,
Expand All @@ -16,24 +17,31 @@ const userSchema = new Schema<IUser>(
},
department: {
type: String,
required: true,
},
designation: {
type: String,
required: true,
},
phoneNumber: {
type: String,
required: false,
},
permanentAddress: {
type: String,
required: false,
},
presentAddress: {
type: String,
required: false,
},
country: {
type: String,
required: false,
},
password: {
type: String,
required: true,
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion backend/src/validations/user.validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const registerZodSchema = z.object({
body: z
.object({
name: z.string().min(1).max(255),
profile_picture: z.string(),
profile_picture: z.string().optional(),
email: z.string().email(),
department: z.string().min(1).max(255),
designation: z.string().min(1).max(255),
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/backend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: backend
spec:
replicas: 1
replicas: 3
selector:
matchLabels:
app: backend
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: frontend
spec:
replicas: 1
replicas: 3
selector:
matchLabels:
app: frontend
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/nginx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: nginx
spec:
replicas: 1
replicas: 3
selector:
matchLabels:
app: nginx
Expand Down

0 comments on commit d5eb25e

Please sign in to comment.