chore: rename route from api-v2 to api (#7379)
* chore: rename route from api-v2 to api * chore: change oas references * chore: remove v2 ref
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { MedusaContainer } from "@medusajs/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
remoteQueryObjectFromString,
|
||||
} from "@medusajs/utils"
|
||||
|
||||
export const refetchCustomerGroup = async (
|
||||
customerGroupId: string,
|
||||
scope: MedusaContainer,
|
||||
fields: string[]
|
||||
) => {
|
||||
const remoteQuery = scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
const queryObject = remoteQueryObjectFromString({
|
||||
entryPoint: "customer_group",
|
||||
variables: {
|
||||
filters: { id: customerGroupId },
|
||||
},
|
||||
fields: fields,
|
||||
})
|
||||
|
||||
const customerGroups = await remoteQuery(queryObject)
|
||||
return customerGroups[0]
|
||||
}
|
||||
Reference in New Issue
Block a user