The Vue Storefront Essentials Course is now available! Learn More
LogoutCustomer

LogoutCustomer

Implements LogoutCustomer Unified Method.

Source

import { defineApi, setCartId } from "@vsf-enterprise/unified-api-sapcc";

export const logoutCustomer = defineApi.logoutCustomer(async (context) => {
  try {
    await context.api.OAuthUserRevoke();
    setCartId(context, "");
    // eslint-disable-next-line no-empty
  } catch {}
});