UNPKG

kaoqin-services

Version:

考勤系统服务库

1 lines 591 B
"use strict";const BaseNotificationService=require("./base-notification"),WeChatService=require("./wechat-service"),NtfyService=require("./ntfy-service"),CompositeNotificationService=require("./composite-notification");function createNotificationService(a){const b=new CompositeNotificationService;return a.get("WX_APP_ID")&&a.get("WX_APP_SECRET")&&b.addService(new WeChatService(a)),(a.get("NTFY.enabled")||a.get("NTFY.forceSend"))&&b.addService(new NtfyService(a)),b}module.exports={BaseNotificationService,WeChatService,NtfyService,CompositeNotificationService,createNotificationService};