feat: urgent fix for instagram

This commit is contained in:
Nevo David 2024-12-11 13:56:02 +07:00
parent 8966bf9593
commit 4d926edb73
2 changed files with 5 additions and 2 deletions

View File

@ -37,7 +37,9 @@ const InstagramCollaborators: FC<{ values?: any }> = (props) => {
{postCurrentType !== 'story' && (
<InstagramCollaboratorsTags
label="Collaborators (max 3) - accounts can't be private"
{...register('collaborators')}
{...register('collaborators', {
value: []
})}
/>
)}
</>

View File

@ -1,5 +1,5 @@
import { Type } from 'class-transformer';
import { IsArray, IsDefined, IsIn, IsString, ValidateNested } from 'class-validator';
import { IsArray, IsDefined, IsIn, IsString, ValidateNested, IsOptional } from 'class-validator';
export class Collaborators {
@IsDefined()
@ -14,5 +14,6 @@ export class InstagramDto {
@Type(() => Collaborators)
@ValidateNested({ each: true })
@IsArray()
@IsOptional()
collaborators: Collaborators[];
}