refactor: metadata entity (#17492)
This commit is contained in:
@@ -2,7 +2,6 @@ import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsEnum, IsNotEmpty, IsString, ValidateIf } from 'class-validator';
|
||||
import { Activity } from 'src/database';
|
||||
import { mapUser, UserResponseDto } from 'src/dtos/user.dto';
|
||||
import { UserEntity } from 'src/entities/user.entity';
|
||||
import { Optional, ValidateUUID } from 'src/validation';
|
||||
|
||||
export enum ReactionType {
|
||||
@@ -75,6 +74,6 @@ export const mapActivity = (activity: Activity): ActivityResponseDto => {
|
||||
createdAt: activity.createdAt,
|
||||
comment: activity.comment,
|
||||
type: activity.isLiked ? ReactionType.LIKE : ReactionType.COMMENT,
|
||||
user: mapUser(activity.user as unknown as UserEntity),
|
||||
user: mapUser(activity.user),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user