Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YAlorenzo committed May 22, 2024
1 parent e26ec79 commit d9548bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/models/product.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ const productSchema = new mongoose.Schema({
}, {timestamps: true});


const Product = mongoose.models.Product;
const Product = mongoose.models.Product || mongoose.model('Product', productSchema);

export default Product;

0 comments on commit d9548bf

Please sign in to comment.