first commit
هذا الالتزام موجود في:
12
src/modules/likes/dto/toggle-like.dto.ts
Normal file
12
src/modules/likes/dto/toggle-like.dto.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsIn, IsMongoId } from 'class-validator';
|
||||
|
||||
export class ToggleLikeDto {
|
||||
@ApiProperty()
|
||||
@IsMongoId()
|
||||
targetId!: string;
|
||||
|
||||
@ApiProperty({ enum: ['post', 'comment'] })
|
||||
@IsIn(['post', 'comment'])
|
||||
targetType!: 'post' | 'comment';
|
||||
}
|
||||
المرجع في مشكلة جديدة
حظر مستخدم