feat: who can reply
This commit is contained in:
parent
59d2d54c51
commit
0473c0f1af
|
|
@ -1,9 +1,18 @@
|
|||
import { IsOptional, Matches } from 'class-validator';
|
||||
import { IsIn, IsOptional, Matches } from 'class-validator';
|
||||
|
||||
export class XDto {
|
||||
@IsOptional()
|
||||
@Matches(/^(https:\/\/x\.com\/i\/communities\/\d+)?$/, {
|
||||
message: 'Invalid X community URL. It should be in the format: https://x.com/i/communities/1493446837214187523',
|
||||
message:
|
||||
'Invalid X community URL. It should be in the format: https://x.com/i/communities/1493446837214187523',
|
||||
})
|
||||
community?: string;
|
||||
|
||||
@IsIn(['everyone', 'following', 'mentionedUsers', 'subscribers', 'verified'])
|
||||
who_can_reply_post:
|
||||
| 'everyone'
|
||||
| 'following'
|
||||
| 'mentionedUsers'
|
||||
| 'subscribers'
|
||||
| 'verified';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue