"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPublisher = exports.withPublisher = void 0;
const PUBLISHER_ID_KEY = "ctx-key-publisher-id";
const withPublisher = (ctx, axios) => {
    return Object.assign(Object.assign({}, ctx), { [PUBLISHER_ID_KEY]: axios });
};
exports.withPublisher = withPublisher;
const getPublisher = (ctx) => {
    const l = ctx[PUBLISHER_ID_KEY];
    if (l == undefined) {
        throw (new Error("publisher not found in the context"));
    }
    return l;
};
exports.getPublisher = getPublisher;
//# sourceMappingURL=context.js.map