UNPKG

@scayle/storefront-core

Version:

Collection of essential utilities to work with the Storefront API

16 lines (15 loc) 469 B
import { mapSAPIFetchErrorToResponse } from "../../utils/sapi.mjs"; import { defineRpcHandler } from "../../utils/index.mjs"; const getShopConfiguration = defineRpcHandler( async (context) => { const { cached, sapiClient } = context; return await cached( mapSAPIFetchErrorToResponse(sapiClient.shopConfiguration.get), { cacheKeyPrefix: "get-shopConfigurations" } )(); }, { method: "GET" } ); export { getShopConfiguration };