@nestjs-mod/webhook
Version:
Webhook module with an error filter, guard, controller, database migrations and rest-sdk for work with module from other nodejs appliaction
24 lines • 900 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebhookToolsService = void 0;
const tslib_1 = require("tslib");
const common_1 = require("@nestjs/common");
const prisma_client_1 = require("../generated/prisma-client");
let WebhookToolsService = class WebhookToolsService {
externalTenantIdQuery(webhookUser, externalTenantId) {
const q = webhookUser?.userRole === prisma_client_1.WebhookRole.User
? {
externalTenantId: webhookUser.externalTenantId,
}
: { externalTenantId };
if (!q.externalTenantId) {
return {};
}
return q;
}
};
exports.WebhookToolsService = WebhookToolsService;
exports.WebhookToolsService = WebhookToolsService = tslib_1.__decorate([
(0, common_1.Injectable)()
], WebhookToolsService);
//# sourceMappingURL=webhook-tools.service.js.map