@osimart/create-storefront 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -59,16 +59,18 @@ const getOrder = async (orderId) => {
59
59
  }
60
60
  };
61
61
 
62
- const promoCode = async (code) => {
62
+ const applyPromoCode = async (code) => {
63
63
  try {
64
64
  const baseUrl = getBaseUrl();
65
65
  const responseData = await apiService(
66
- `${baseUrl}store/apis/promocodes/?code=${code}`,
67
- { method: "GET" },
66
+ `${baseUrl}store/apis/promocodes/apply/`,
67
+ { method: "POST",
68
+ headers: cartHeaders(),
69
+ body: JSON.stringify({ code }), },
68
70
  );
69
71
  return responseData;
70
72
  } catch (error) {
71
- console.error("Promo code error:", error);
73
+ console.error("Promo apply error:", error);
72
74
  throw error;
73
75
  }
74
76
  };
@@ -107,7 +109,7 @@ export default {
107
109
  fetchCart,
108
110
  placeOrder,
109
111
  getOrder,
110
- promoCode,
112
+ applyPromoCode,
111
113
  freeDeliveries,
112
114
  extraFees,
113
115
  };
package/nuxt.config.ts CHANGED
@@ -22,7 +22,13 @@ const appDir = fileURLToPath(new URL("./app", import.meta.url));
22
22
 
23
23
  export default defineNuxtConfig({
24
24
  compatibilityDate: "2025-07-15",
25
-
25
+ app: {
26
+ head: {
27
+ meta: [
28
+ { name: "viewport", content: "width=device-width, initial-scale=1" }
29
+ ],
30
+ },
31
+ },
26
32
  alias: {
27
33
  "#osi": appDir,
28
34
  "#logic": `${appDir}/logic`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimart/create-storefront",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Osimart storefront platform — logic, platform pages and CLI; extended by every theme repo",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",