Skip to content

Commit

Permalink
Merge branch 'main' of github.com:deco-cx/apps into feat-blog-like
Browse files Browse the repository at this point in the history
  • Loading branch information
decobot committed Oct 15, 2024
2 parents 76b6520 + deae9c0 commit 1791251
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@
"jsx": "react-jsx",
"jsxImportSource": "preact"
},
"version": "0.62.3"
"version": "0.62.5"
}
6 changes: 3 additions & 3 deletions shopify/loaders/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ const buildProxyRoutes = (
ctx: AppContext;
},
) => {
const urlToUse = publicUrl ?
new URL(publicUrl.startsWith("http") ? publicUrl : `https://${publicUrl}`) :
new URL(`https://${storeName}.myshopify.com`);
const urlToUse = publicUrl
? new URL(publicUrl.startsWith("http") ? publicUrl : `https://${publicUrl}`)
: new URL(`https://${storeName}.myshopify.com`);

const hostname = urlToUse.hostname;

Expand Down
4 changes: 3 additions & 1 deletion vtex/actions/cart/updateItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface Item {
export interface Props {
orderItems: Item[];
allowedOutdatedData?: Array<"paymentData">;
noSplitItem?: boolean;
}

/**
Expand All @@ -26,6 +27,7 @@ const action = async (
const {
orderItems,
allowedOutdatedData = ["paymentData"],
noSplitItem,
} = props;
const { orderFormId } = parseCookie(req.headers);
const cookie = req.headers.get("cookie") ?? "";
Expand All @@ -37,7 +39,7 @@ const action = async (
allowedOutdatedData,
sc: segment?.payload.channel,
}, {
body: { orderItems },
body: { orderItems, noSplitItem: Boolean(noSplitItem) },
headers: {
"content-type": "application/json",
accept: "application/json",
Expand Down
3 changes: 1 addition & 2 deletions vtex/actions/wishlist/addItem.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import wishlistLoader from "../../loaders/wishlist.ts";
import { AppContext } from "../../mod.ts";
import type { WishlistItem } from "../../utils/types.ts";
import { parseCookie } from "../../utils/vtexId.ts";
Expand Down Expand Up @@ -32,7 +31,7 @@ const action = async (
`mutation AddToWishlist($listItem: ListItemInputType!, $shopperId: String!, $name: String!, $public: Boolean) { addToList(listItem: $listItem, shopperId: $shopperId, name: $name, public: $public) @context(provider: "vtex.wish-list@1.x") }`,
}, { headers: { cookie } });

return wishlistLoader({ count: Infinity }, req, ctx);
return ctx.invoke.vtex.loaders.wishlist({ allRecords: true });
};

export default action;

0 comments on commit 1791251

Please sign in to comment.