Skip to content

Commit

Permalink
Merge pull request #24 from ecstacy-fcs/description-change
Browse files Browse the repository at this point in the history
Change validation
  • Loading branch information
thesantatitan authored Nov 10, 2021
2 parents d70d896 + 941fafb commit 1463a30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ model Buyer {
model Product {
id String @id @default(uuid())
name String
description String
description String @db.VarChar(1028)
price Int
sellerId String
categoryId String
Expand Down
2 changes: 1 addition & 1 deletion src/routes/products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const route = express();

const productSchema = Joi.object({
name: Joi.string().trim().max(28).required(),
description: Joi.string().trim().max(124).required(),
description: Joi.string().trim().max(1024).required(),
price: Joi.number().positive().max(15000).min(1).required(),
category: Joi.string().trim().required(),
});
Expand Down

0 comments on commit 1463a30

Please sign in to comment.