feat: Add show stream plugin types

This commit is contained in:
Aleksi Lassila
2024-12-22 05:06:02 +02:00
parent 1e15dfac4c
commit d72e3b37c4
7 changed files with 47 additions and 21 deletions

View File

@@ -7,16 +7,7 @@ import {
} from '@nestjs/swagger';
import { MediaSource } from './user-source.entity';
import { Type } from '@nestjs/common';
const PickAndPartial = <T, K extends keyof T>(
clazz: Type<T>,
pick: K[] = [],
partial: K[] = [],
) =>
IntersectionType(
OmitType(PickType(clazz, pick), partial),
PickType(PartialType(clazz), partial),
);
import { PickAndPartial } from 'src/common/common.dto';
export class SourceDto extends PickAndPartial(
MediaSource,