Skip to content

Commit

Permalink
Fixed error in mongoose Offer.ts combinedItems type was wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
zhamdi committed Dec 12, 2023
1 parent a8de64b commit 6d59298
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@user-credits/stripe-mongoose",
"author": "Zied Hamdi",
"type": "module",
"version": "1.0.0-beta",
"version": "1.0.1-beta",
"license": "MIT",
"keywords": [
"user-credits",
Expand Down Expand Up @@ -36,7 +36,7 @@
"buildTrace": "rmdir /s /q .\\dist & npx tsc --traceResolution",
"lint": "npx eslint --fix .",
"prepublishOnly": "pnpm lint && pnpm build && pnpm testPublish",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage --coverageDirectory='coverage'",
"testWatch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watchAll --no-cache --coverage --coverageDirectory='coverage'",
"testPublish": "node --experimental-vm-modules node_modules/jest/bin/jest.js --no-cache"
},
Expand Down
14 changes: 8 additions & 6 deletions src/impl/mongoose/model/Offer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ export type IMongooseOffer = IOffer<ObjectId> & Document;

const offerSchema = new Schema<IMongooseOffer>({
appendDate: Boolean,
combinedItems: {
// ICombinedOffer
offerGroup: String,
offerId: Schema.ObjectId,
quantity: Number,
},
combinedItems: [
{
// ICombinedOffer
offerGroup: String,
offerId: Schema.ObjectId,
quantity: Number,
},
],
currency: String,
customCycle: Number,
cycle: {
Expand Down

0 comments on commit 6d59298

Please sign in to comment.