fix: bundle report db driver for survey sync
This commit is contained in:
parent
3db0ce72a1
commit
739db0bb71
@ -1,5 +1,6 @@
|
||||
import { randomUUID } from 'crypto'
|
||||
import { prisma } from '@/lib/prisma'
|
||||
import mssql from 'mssql'
|
||||
|
||||
type ReportEmployeeRow = {
|
||||
dingtalkUserId?: string | null
|
||||
@ -556,8 +557,7 @@ function shouldRefreshProfile(profile: { syncedAt?: Date | null; departmentName?
|
||||
}
|
||||
|
||||
async function getReportPool() {
|
||||
const imported = await import('mssql')
|
||||
const sql = (imported.default || imported) as typeof import('mssql')
|
||||
const sql = mssql as typeof import('mssql')
|
||||
return {
|
||||
sql,
|
||||
pool: await sql.connect(getReportDbConfig() as any),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user