Skip to content

Commit

Permalink
refactor(template): Change createSchema to schema on validators
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Nov 18, 2021
1 parent 78c1ae1 commit 0a91dd9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/templates/nestjsMongoose/__name__Validator.ts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Validator } from '@secjs/validator'

@Injectable()
export class <%= namePascal %>Validator extends Validator {
createSchema = () => {
get schema() {
return {
name: 'string|required',
}
}

updateSchema = () => {
get updateSchema() {
return {
name: 'string',
}
Expand Down
4 changes: 2 additions & 2 deletions app/templates/nestjsPrismaOrm/__name__Validator.ts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Validator } from '@secjs/validator'

@Injectable()
export class <%= namePascal %>Validator extends Validator {
createSchema = () => {
get schema() {
return {
name: 'string|required',
}
}

updateSchema = () => {
get updateSchema() {
return {
name: 'string',
}
Expand Down
4 changes: 2 additions & 2 deletions app/templates/nestjsTypeOrm/__name__Validator.ts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Validator } from '@secjs/validator'

@Injectable()
export class <%= namePascal %>Validator extends Validator {
createSchema = () => {
get schema() {
return {
name: 'string|required',
}
}

updateSchema = () => {
get updateSchema() {
return {
name: 'string',
}
Expand Down

0 comments on commit 0a91dd9

Please sign in to comment.