File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export class UserDto {
44
44
readonly title : string ;
45
45
46
46
@ApiModelPropertyOptional ( )
47
- @Length ( 3 , 140 )
47
+ @Length ( 3 , 400 )
48
48
@IsString ( )
49
49
@IsOptional ( )
50
50
readonly description : string ;
@@ -74,7 +74,7 @@ export class UserDto {
74
74
@ApiModelPropertyOptional ( )
75
75
@IsOptional ( )
76
76
@ArrayMinSize ( 1 )
77
- @ArrayMaxSize ( 5 )
77
+ @ArrayMaxSize ( 10 )
78
78
@IsString ( {
79
79
each : true ,
80
80
} )
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import { ListDto } from '../lists/dto/list.dto';
37
37
import { ListsService } from '../lists/lists.service' ;
38
38
import { filterImages } from '../../utils/mimes' ;
39
39
import { MentorshipsService } from '../mentorships/mentorships.service' ;
40
+ import { Status } from '../mentorships/interfaces/mentorship.interface' ;
40
41
41
42
@ApiUseTags ( '/users' )
42
43
@ApiBearerAuth ( )
@@ -168,8 +169,9 @@ export class UsersController {
168
169
user . _id ,
169
170
) ;
170
171
return mentorships . some (
171
- ( { mentee, mentor } ) =>
172
- mentor ?. _id . equals ( user . _id ) || mentee ?. _id . equals ( user . _id ) ,
172
+ ( { mentee, mentor, status } ) =>
173
+ status === Status . APPROVED &&
174
+ ( mentor ?. _id . equals ( user . _id ) || mentee ?. _id . equals ( user . _id ) ) ,
173
175
) ;
174
176
}
175
177
You can’t perform that action at this time.
0 commit comments