Skip to content

Commit

Permalink
Merge pull request #101 from Arquisoft/order-fix
Browse files Browse the repository at this point in the history
fixed order
  • Loading branch information
p3rryw1nkle authored Apr 2, 2022
2 parents 04fbe29 + 528130d commit 622f9bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion restapi/interfaces/OrderInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import IProduct from "./ProductInterface";
export default interface IOrder extends Document {
webId: string
addres: string
shipping: number
shippingPrice: number
totalPrice: number
products: Map<IProduct, Number>
}
13 changes: 7 additions & 6 deletions restapi/schemas/OrderSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ const Map = Schema.Types.Map;
const orderSchema = new Schema (
{
webId: {type: String, required: true},
address: String,
shipping: Number,
totalPrice: Number,
products: {type: Map, of: Number}

}
address: {type: String, required: true},
shippingPrice: {type: Number, required: true},
totalPrice: {type: Number, required: true},
products: {type: Map, of: Number, required: true}
}, {
timestamps: true
}
);


Expand Down

0 comments on commit 622f9bf

Please sign in to comment.