Skip to content

Commit

Permalink
Adjust path function types
Browse files Browse the repository at this point in the history
  • Loading branch information
kagami-l committed Jul 15, 2024
1 parent 0ecf38a commit 461b7a1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion devchat/_service/route/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


@router.get("/ping")
def ping():
async def ping():
return {"message": "pong"}


Expand Down
4 changes: 2 additions & 2 deletions devchat/_service/route/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


@router.post("/insert", response_model=response.InsertLog)
async def insert(
def insert(
item: request.InsertLog,
):
try:
Expand All @@ -20,7 +20,7 @@ async def insert(


@router.post("/delete", response_model=response.DeleteLog)
async def delete(
def delete(
item: request.DeleteLog,
):
try:
Expand Down
2 changes: 1 addition & 1 deletion devchat/_service/route/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


@router.post("/msg")
async def msg(
def msg(
message: request.UserMessage,
):
if message.api_key:
Expand Down
2 changes: 1 addition & 1 deletion devchat/_service/route/topics.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


@router.get("/{topic_root_hash}/logs", response_model=List[response.ShortLog])
async def get_topic_logs(
def get_topic_logs(
topic_root_hash: str,
limit: int = Query(1, gt=0, description="maximum number of records to return"),
offset: int = Query(0, ge=0, description="offset of the first record to return"),
Expand Down
6 changes: 3 additions & 3 deletions devchat/_service/route/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


@router.get("/list", response_model=List[WorkflowMeta])
async def list_workflow():
def list_workflow():
namespace_paths = get_prioritized_namespace_path()

workflows: List[WorkflowMeta] = []
Expand All @@ -39,7 +39,7 @@ async def list_workflow():


@router.get("/config")
async def get_config():
def get_config():
config_path = Path(WORKFLOWS_BASE) / WORKFLOWS_CONFIG_FILENAME
config_content = {}
if config_path.exists():
Expand All @@ -50,7 +50,7 @@ async def get_config():


@router.post("/update", response_model=response.UpdateWorkflows)
async def update_workflows():
def update_workflows():
base_path = Path(WORKFLOWS_BASE)

if HAS_GIT:
Expand Down

0 comments on commit 461b7a1

Please sign in to comment.