Skip to content

Commit

Permalink
fetch Channel ID from DB
Browse files Browse the repository at this point in the history
  • Loading branch information
motty-mio2 committed Nov 18, 2023
1 parent b7b02a6 commit c69b663
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/kb_2315/notify/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@
from kb_2315.config import conf


line_channel_id: str = crud_user.search_user_by()[0].line_channel_id


def send_message(
message: str,
send_to_id: str = line_channel_id,
send_to_id: str = crud_user.search_user_by()[0].line_channel_id,
) -> None:
line_bot_api = LineBotApi(conf.line_channel_access_token)

Expand All @@ -33,7 +30,7 @@ def send_message(
print(f"Send Message Error:\n{e}")


def shoe_list_carousel(send_to_id: str = line_channel_id) -> None:
def shoe_list_carousel(send_to_id: str = crud_user.search_user_by()[0].line_channel_id) -> None:
columns_list: list[CarouselColumn] = []
shoes: list[Shoe] = crud_shoe.search_shoe_by()

Expand Down Expand Up @@ -62,7 +59,10 @@ def shoe_list_carousel(send_to_id: str = line_channel_id) -> None:
print(f"LineBotApiError: {e}")


def shoe_select_carousel(send_to_id: str = line_channel_id, session_id: UUID | None = None) -> None:
def shoe_select_carousel(
send_to_id: str = crud_user.search_user_by()[0].line_channel_id,
session_id: UUID | None = None,
) -> None:
columns_list: list[CarouselColumn] = []
shoes: list[Shoe] = crud_shoe.search_shoe_by()

Expand Down

0 comments on commit c69b663

Please sign in to comment.