20 lines
668 B
TypeScript
20 lines
668 B
TypeScript
import managePipeline from "../controllers/managePipeLine"
|
|
import manageProject from "../controllers/manageProject"
|
|
import manageUser from "../controllers/manageUser"
|
|
|
|
const syncPipLine = async () => {
|
|
const fullProjList = await manageProject.getFullProjList()
|
|
const fullPipelineList = await Promise.all(
|
|
fullProjList.map((v) => managePipeline.getFullPipelineList(v))
|
|
)
|
|
const fullUserMap = await manageUser.getFullUserMap(fullPipelineList)
|
|
const fullProjectMap = await manageProject.getFullProjectMap(fullProjList)
|
|
await managePipeline.insertFullPipelineList(
|
|
fullPipelineList,
|
|
fullUserMap,
|
|
fullProjectMap
|
|
)
|
|
}
|
|
|
|
export default syncPipLine
|