diff --git a/src/database/factories/user.factory.ts b/src/database/factories/user.factory.ts index 75965140..ea901474 100644 --- a/src/database/factories/user.factory.ts +++ b/src/database/factories/user.factory.ts @@ -15,7 +15,7 @@ export default setSeederFactory(User, async () => { user.lastName = lastName; user.displayName = `${firstName} ${lastName}`; user.birthdate = faker.date.birthdate({ min: 13, max: 65, mode: 'age' }); - user.gender = faker.helpers.arrayElement(['male', 'female', 'other', 'preferNotToSay']); + user.gender = faker.helpers.arrayElement(['male', 'female']); user.bio = faker.lorem.sentence(); user.avatarUrl = faker.image.avatar(); user.country = faker.location.country(); diff --git a/src/notifications/notifications.swagger.ts b/src/notifications/notifications.swagger.ts index 7c080f24..3b33252d 100644 --- a/src/notifications/notifications.swagger.ts +++ b/src/notifications/notifications.swagger.ts @@ -51,7 +51,8 @@ export function ApiGetNotifications() { name: 'type', required: false, type: String, - description: 'Filter by notification type (e.g., follow, like, repost, comment)', + description: + 'Filter by notification type (new_follower, new_like, new_repost, new_comment, new_post)', }), ApiResponse({ status: HttpStatus.OK, diff --git a/src/user/dto/update-gender.dto.ts b/src/user/dto/update-gender.dto.ts index 8febc814..e8b4a835 100644 --- a/src/user/dto/update-gender.dto.ts +++ b/src/user/dto/update-gender.dto.ts @@ -4,11 +4,11 @@ import { IsIn } from 'class-validator'; export class UpdateGenderReqDto { @ApiProperty({ description: 'Gender value', - enum: ['male', 'female', 'preferNotToSay'], + enum: ['male', 'female'], example: 'male', }) - @IsIn(['male', 'female', 'preferNotToSay'], { - message: "Gender must be one of: 'male','female','preferNotToSay'", + @IsIn(['male', 'female'], { + message: "Gender must be one of: 'male','female'", }) gender!: string; } diff --git a/src/user/dto/update-profile-req.dto.ts b/src/user/dto/update-profile-req.dto.ts index 3258ee8f..9221ecce 100644 --- a/src/user/dto/update-profile-req.dto.ts +++ b/src/user/dto/update-profile-req.dto.ts @@ -74,12 +74,12 @@ export class UpdateProfileReqDto { city?: string; @ApiPropertyOptional({ - description: "Gender — accepted values: 'male', 'female', 'preferNotToSay'", + description: "Gender — accepted values: 'male', 'female'", example: 'male', - enum: ['male', 'female', 'preferNotToSay'], + enum: ['male', 'female'], }) @IsOptional() - @IsIn(['male', 'female', 'preferNotToSay']) + @IsIn(['male', 'female']) gender?: string; @ApiPropertyOptional({ diff --git a/src/user/profile.swagger.ts b/src/user/profile.swagger.ts index e54feaef..10ce03cc 100644 --- a/src/user/profile.swagger.ts +++ b/src/user/profile.swagger.ts @@ -132,7 +132,7 @@ export function ApiUpdateProfile() { bio: { type: 'string', maxLength: 1000, example: 'Backend dev by day.' }, country: { type: 'string', maxLength: 100, example: 'EG' }, city: { type: 'string', maxLength: 100, example: 'Alexandria' }, - gender: { type: 'string', enum: ['male', 'female', 'preferNotToSay'] }, + gender: { type: 'string', enum: ['male', 'female'] }, favoriteGenres: { type: 'array', items: { type: 'string' }, @@ -227,7 +227,7 @@ export function ApiUpdateBirthdate() { return applyDecorators( ApiCookieAuth('access_token'), ApiOperation({ - summary: 'Update my birthdate', + summary: 'Update my birthdate - deprecated', description: "Updates the authenticated user's birthdate. Must be in YYYY-MM-DD format, not in the future, and the user must be at least 13 years old.", }), @@ -289,9 +289,8 @@ export function ApiUpdateGender() { return applyDecorators( ApiCookieAuth('access_token'), ApiOperation({ - summary: 'Update my gender', - description: - "Updates the authenticated user's gender. Accepted values: 'male', 'female', 'preferNotToSay'.", + summary: 'Update my gender - deprecated', + description: "Updates the authenticated user's gender. Accepted values: 'male', 'female'.", }), ApiResponse({ status: 200, @@ -314,9 +313,7 @@ export function ApiUpdateGender() { example: { status: 'error', message: 'Validation failed', - errors: [ - { field: 'gender', message: "Gender must be one of: 'male','female','preferNotToSay'" }, - ], + errors: [{ field: 'gender', message: "Gender must be one of: 'male','female'" }], }, }, }), @@ -329,7 +326,7 @@ export function ApiUpdatePrivacy() { return applyDecorators( ApiCookieAuth('access_token'), ApiOperation({ - summary: 'Change account privacy', + summary: 'Change account privacy - deprecated', description: "Toggles the authenticated user's account between public and private. Private accounts hide their content from non-followers.", }), @@ -368,7 +365,7 @@ export function ApiUpdateAvatar() { ApiCookieAuth('access_token'), ApiConsumes('multipart/form-data'), ApiOperation({ - summary: 'Update profile picture', + summary: 'Update profile picture - deprecated', description: "Updates the authenticated user's avatar/profile picture. The image is optimized, converted to WebP, and saved to S3.", }), @@ -422,7 +419,7 @@ export function ApiUpdateCover() { ApiCookieAuth('access_token'), ApiConsumes('multipart/form-data'), ApiOperation({ - summary: 'Update cover photo', + summary: 'Update cover photo - deprecated', description: "Updates the authenticated user's cover photo and saves it to S3.", }), ApiBody({