UNPKG

@vtex/api

Version:
14 lines (13 loc) 419 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.clients = void 0; function clients(ClientsImpl, clientOptions) { return async function withClients(ctx, next) { if (ctx.serverTiming) { ctx.vtex.serverTiming = ctx.serverTiming; } ctx.clients = new ClientsImpl(clientOptions, ctx.vtex); await next(); }; } exports.clients = clients;