diff --git a/backend/data/medusa-eats-seed-data.json b/backend/data/medusa-eats-seed-data.json index eddd153..eb3481b 100644 --- a/backend/data/medusa-eats-seed-data.json +++ b/backend/data/medusa-eats-seed-data.json @@ -46,11 +46,11 @@ "prices": [ { "amount": 12.99, - "currency_code": "USD" + "currency_code": "usd" }, { "amount": 9.99, - "currency_code": "EUR" + "currency_code": "eur" } ] } @@ -73,11 +73,11 @@ "prices": [ { "amount": 14.99, - "currency_code": "USD" + "currency_code": "usd" }, { "amount": 11.99, - "currency_code": "EUR" + "currency_code": "eur" } ] } @@ -100,11 +100,11 @@ "prices": [ { "amount": 9.99, - "currency_code": "USD" + "currency_code": "usd" }, { "amount": 7.99, - "currency_code": "EUR" + "currency_code": "eur" } ] } @@ -127,11 +127,11 @@ "prices": [ { "amount": 11.99, - "currency_code": "USD" + "currency_code": "usd" }, { "amount": 8.99, - "currency_code": "EUR" + "currency_code": "eur" } ] } @@ -154,11 +154,11 @@ "prices": [ { "amount": 5.99, - "currency_code": "USD" + "currency_code": "usd" }, { "amount": 4.99, - "currency_code": "EUR" + "currency_code": "eur" } ] } @@ -181,11 +181,11 @@ "prices": [ { "amount": 2.99, - "currency_code": "USD" + "currency_code": "usd" }, { "amount": 1.99, - "currency_code": "EUR" + "currency_code": "eur" } ] } diff --git a/backend/src/api/restaurants/route.ts b/backend/src/api/restaurants/route.ts index a02dce3..772e0f1 100644 --- a/backend/src/api/restaurants/route.ts +++ b/backend/src/api/restaurants/route.ts @@ -1,9 +1,9 @@ import { MedusaRequest, MedusaResponse } from "@medusajs/medusa"; import { MedusaError, remoteQueryObjectFromString } from "@medusajs/utils"; -import { createRestaurantWorkflow } from "../../workflows/restaurant/workflows"; import zod from "zod"; import { CreateRestaurantDTO } from "../../types/restaurant/mutations"; import { getPricesByPriceSetId } from "../../utils/get-prices-by-price-set-id"; +import { createRestaurantWorkflow } from "../../workflows/restaurant/workflows"; const schema = zod.object({ name: zod.string(), @@ -97,7 +97,7 @@ export async function GET(req: MedusaRequest, res: MedusaResponse) { const productsWithPrices = await getPricesByPriceSetId({ products, - currency_code: "EUR", + currency_code: "eur", pricingService: req.scope.resolve("pricingModuleService"), }); diff --git a/backend/src/scripts/seed.ts b/backend/src/scripts/seed.ts index f8cbab7..3b946cf 100644 --- a/backend/src/scripts/seed.ts +++ b/backend/src/scripts/seed.ts @@ -71,7 +71,7 @@ export default async function seedDemoData({ container }: ExecArgs) { update: { supported_currencies: [ { - currency_code: "EUR", + currency_code: "eur", is_default: true, }, { @@ -88,7 +88,7 @@ export default async function seedDemoData({ container }: ExecArgs) { regions: [ { name: "Europe", - currency_code: "EUR", + currency_code: "eur", countries, payment_providers: ["pp_system_default"], }, @@ -228,7 +228,7 @@ export default async function seedDemoData({ container }: ExecArgs) { amount: 10, }, { - currency_code: "EUR", + currency_code: "eur", amount: 10, }, { @@ -266,7 +266,7 @@ export default async function seedDemoData({ container }: ExecArgs) { amount: 10, }, { - currency_code: "EUR", + currency_code: "eur", amount: 10, }, { diff --git a/frontend/src/lib/actions/carts.ts b/frontend/src/lib/actions/carts.ts index adfe690..6218109 100644 --- a/frontend/src/lib/actions/carts.ts +++ b/frontend/src/lib/actions/carts.ts @@ -1,6 +1,5 @@ "use server"; -import { metadata } from "@frontend/app/layout"; import { retrieveUser } from "@frontend/lib/data"; import { CartDTO, CreateCartDTO } from "@medusajs/types"; import { revalidateTag } from "next/cache"; @@ -67,7 +66,7 @@ export async function addToCart( if (!cartId) { cart = await createCart( { - currency_code: "EUR", + currency_code: "eur", }, restaurantId );