egg_server/utils/genLarkService.ts

15 lines
323 B
TypeScript

import { LarkService } from "@egg/net-tool"
import { APP_MAP } from "../constant/config"
const genLarkService = (app: string, requestId: string) => {
const appInfo = APP_MAP[app]
return new LarkService({
appId: appInfo.appId,
appSecret: appInfo.appSecret,
requestId,
})
}
export default genLarkService