updates :)
This commit is contained in:
+1
-9
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
from typing import Any
|
||||
|
||||
from db.connection import DB_PATH as DB_PATH, init_db as init_db
|
||||
from db.repositories import flow_config_repo, runs_repo
|
||||
from db.repositories import flow_config_repo as flow_config_repo, runs_repo
|
||||
|
||||
FlowConfigRow = dict[str, Any]
|
||||
|
||||
@@ -36,10 +36,6 @@ async def get_flow_config(cfg_id: int) -> FlowConfigRow | None:
|
||||
return await flow_config_repo.get(cfg_id)
|
||||
|
||||
|
||||
async def get_active_flow_config() -> FlowConfigRow | None:
|
||||
return await flow_config_repo.get_active()
|
||||
|
||||
|
||||
async def upsert_flow_config(data: dict[str, Any], cfg_id: int | None = None) -> int:
|
||||
if cfg_id is None:
|
||||
return await flow_config_repo.create(data)
|
||||
@@ -49,7 +45,3 @@ async def upsert_flow_config(data: dict[str, Any], cfg_id: int | None = None) ->
|
||||
|
||||
async def delete_flow_config(cfg_id: int) -> None:
|
||||
await flow_config_repo.delete(cfg_id)
|
||||
|
||||
|
||||
async def activate_flow_config(cfg_id: int) -> None:
|
||||
await flow_config_repo.activate(cfg_id)
|
||||
|
||||
Reference in New Issue
Block a user