import asyncio

from csirtmu.self_service_backend.config import AppConfig
from csirtmu.self_service_backend.repository import StepRepository
from csirtmu.self_service_backend.step_builder import StepBuilder


async def load() -> None:
    c = AppConfig.get()
    steps = StepBuilder().build(c.steps)
    await StepRepository(c.database).insert_steps(steps)


if __name__ == "__main__":
    asyncio.run(load())
