generated from xgeekshq/oss-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f3d715
commit 313133b
Showing
19 changed files
with
6,165 additions
and
4,345 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Type } from 'class-transformer'; | ||
import { IsNotEmpty, IsString } from 'class-validator'; | ||
import CardDto from './card.dto'; | ||
|
||
export class AddCardDto { | ||
@IsNotEmpty() | ||
@IsString() | ||
colIdToAdd!: string; | ||
|
||
@IsNotEmpty() | ||
@Type(() => CardDto) | ||
card!: CardDto; | ||
|
||
@IsNotEmpty() | ||
@IsString() | ||
socketId!: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,8 @@ | ||
import { IsNotEmpty, IsString, ValidateNested } from 'class-validator'; | ||
import { Transform, TransformFnParams } from 'class-transformer'; | ||
import CardItem from '../../schemas/card.item.schema'; | ||
|
||
export default class CardDto { | ||
@IsNotEmpty() | ||
@IsString() | ||
_id!: string; | ||
|
||
@IsNotEmpty() | ||
@IsString() | ||
@Transform(({ value }: TransformFnParams) => value.trim()) | ||
text!: string; | ||
import { IsNotEmpty, ValidateNested } from 'class-validator'; | ||
import CardItemDto from './card.item.dto'; | ||
|
||
export default class CardDto extends CardItemDto { | ||
@IsNotEmpty() | ||
@ValidateNested({ each: true }) | ||
items!: CardItem[]; | ||
|
||
// @ValidateNested({ each: true }) | ||
// @Type(() => CommentDto) | ||
// comments!: CommentDto[]; | ||
|
||
// @IsNotEmpty() | ||
// votes!: string[]; | ||
items!: CardItemDto[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { IsNotEmpty, IsString } from 'class-validator'; | ||
|
||
export default class DeleteCardDto { | ||
@IsNotEmpty() | ||
@IsString() | ||
socketId!: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { IsNotEmpty, IsString } from 'class-validator'; | ||
|
||
export default class UpdateCardDto { | ||
@IsNotEmpty() | ||
@IsString() | ||
text!: string; | ||
|
||
@IsNotEmpty() | ||
@IsString() | ||
socketId!: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.