import { GetOrder } from "../../models/api"; import { api } from "./api"; import { extractBodyFromResponse, extractErrorMessageFromResponse } from "./utils"; export const landingApi = api.injectEndpoints({ endpoints: ({ query }) => ({ getOrder: query({ query: ({ orderId }) => `/order/${orderId}`, transformResponse: extractBodyFromResponse, transformErrorResponse: extractErrorMessageFromResponse, }) }) });