feat: urgent fix for instagram
This commit is contained in:
parent
8966bf9593
commit
4d926edb73
|
|
@ -37,7 +37,9 @@ const InstagramCollaborators: FC<{ values?: any }> = (props) => {
|
||||||
{postCurrentType !== 'story' && (
|
{postCurrentType !== 'story' && (
|
||||||
<InstagramCollaboratorsTags
|
<InstagramCollaboratorsTags
|
||||||
label="Collaborators (max 3) - accounts can't be private"
|
label="Collaborators (max 3) - accounts can't be private"
|
||||||
{...register('collaborators')}
|
{...register('collaborators', {
|
||||||
|
value: []
|
||||||
|
})}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Type } from 'class-transformer';
|
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 {
|
export class Collaborators {
|
||||||
@IsDefined()
|
@IsDefined()
|
||||||
|
|
@ -14,5 +14,6 @@ export class InstagramDto {
|
||||||
@Type(() => Collaborators)
|
@Type(() => Collaborators)
|
||||||
@ValidateNested({ each: true })
|
@ValidateNested({ each: true })
|
||||||
@IsArray()
|
@IsArray()
|
||||||
|
@IsOptional()
|
||||||
collaborators: Collaborators[];
|
collaborators: Collaborators[];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue