forked from xgeekshq/split
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from xgeekshq/main
feat: create, update and delete card (xgeekshq#74)
- Loading branch information
Showing
19 changed files
with
19,931 additions
and
81 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; | ||
} |
Oops, something went wrong.