Display all bands grouped by genre, create m:n association between Band and Genre in database
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import axios from "axios"
|
||||
import { OrderModel } from "../models/orderModel"
|
||||
import { BasketItemModel } from "../models/basketItemModel"
|
||||
import { calcPrice } from "@/scripts/productScripts"
|
||||
|
||||
const BASE_URL = "http://localhost:3000/orders"
|
||||
|
||||
@@ -17,13 +16,13 @@ export async function addOrder(
|
||||
) {
|
||||
let orderItems = []
|
||||
|
||||
for (let basketItem of basketItems) {
|
||||
orderItems.push({
|
||||
productId: basketItem.product.id,
|
||||
quantity: basketItem.quantity,
|
||||
orderPrice: calcPrice(basketItem.product.price, basketItem.product.discount)
|
||||
})
|
||||
}
|
||||
// for (let basketItem of basketItems) {
|
||||
// orderItems.push({
|
||||
// productId: basketItem.product.id,
|
||||
// quantity: basketItem.quantity,
|
||||
// orderPrice: calcPrice(basketItem.product.price, basketItem.product.discount)
|
||||
// })
|
||||
// }
|
||||
|
||||
return axios.post(BASE_URL, {
|
||||
accountId: accountId,
|
||||
|
||||
Reference in New Issue
Block a user