@@ -188,14 +188,22 @@ Content-Type: application/json
188188 "fname" : " Test" ,
189189 "lname" : " User"
190190 },
191- "username" : " Userrr " ,
191+ "username" : " custom-username " ,
192192 "email" : " user@example.com" ,
193193 "password" : " Pa$$word!" ,
194194 "phoneNumber" : " +1234567890" ,
195- "avatar" : " https://example.com/avatar.jpg"
195+ "avatar" : " https://example.com/avatar.jpg" ,
196+ "jobTitle" : " Software Engineer" ,
197+ "company" : " Ciscode"
196198}
197199```
198200
201+ ** Notes:**
202+
203+ - ` username ` is now ** optional** . If not provided, it will be auto-generated as ` fname-lname ` (e.g., ` test-user ` )
204+ - ` jobTitle ` and ` company ` are ** optional** profile fields
205+ - All other fields work as before
206+
199207** Response:**
200208
201209``` json
@@ -387,10 +395,12 @@ All permissions are assigned to the `admin` role.
387395 fname : string ,
388396 lname : string
389397 },
390- username : string (unique , 3 - 30 chars ),
398+ username : string (unique , 3 - 30 chars , auto - generated as fname - lname if not provided ),
391399 email : string (unique , validated ),
392400 phoneNumber ?: string (unique , 10 - 14 digits ),
393401 avatar ?: string (default : ' default.jpg' ),
402+ jobTitle ?: string ,
403+ company ?: string ,
394404 password : string (hashed , min 6 chars ),
395405 roles : ObjectId [] (references Role ),
396406 isVerified : boolean (default : false ),
0 commit comments