UNPKG

nestjs-slack-webhook

Version:
15 lines (13 loc) 416 B
import { Provider } from "@nestjs/common"; import { IncomingWebhook } from "@slack/webhook"; import { getSlackClient } from "./getSlackClient"; import { SLACK_TOKEN } from "./slackConstants"; import { SlackOptions } from "./slackOptions"; export function createSlackProvider( options: SlackOptions, ): Provider<IncomingWebhook> { return { provide: SLACK_TOKEN, useValue: getSlackClient(options), }; }