kenken999 commited on
Commit
33413a1
1 Parent(s): f416a92
Files changed (1) hide show
  1. mysite/router/fastapi.py +7 -0
mysite/router/fastapi.py CHANGED
@@ -10,9 +10,14 @@ import os
10
  import pkgutil
11
  from mysite.libs.utilities import validate_signature, no_process_file
12
  from mysite.database.database import ride,create_ride
 
 
13
 
14
  logger = logging.getLogger(__name__)
15
 
 
 
 
16
  def include_routers(app):
17
  package_dir = "/home/user/app/routers"
18
  if not os.path.exists(package_dir):
@@ -64,6 +69,7 @@ def setup_webhook_routes(app: FastAPI):
64
  text = event["message"]["text"]
65
  logger.info("------------------------------------------")
66
  logger.info(f"User ID: {user_id}, Text: {text}")
 
67
  no_process_file(text, "ai")
68
 
69
 
@@ -77,6 +83,7 @@ def setup_webhook_routes(app: FastAPI):
77
  title = text[:10]
78
  user_id_with_timestamp = f"{now}_{title}_{user_id}"
79
  no_process_file(text, user_id_with_timestamp)
 
80
 
81
  logger.info("Received Headers: %s", received_headers)
82
  logger.info("Received Body: %s", body.decode("utf-8"))
 
10
  import pkgutil
11
  from mysite.libs.utilities import validate_signature, no_process_file
12
  from mysite.database.database import ride,create_ride
13
+ from controllers.gra_04_database import test_set_lide
14
+
15
 
16
  logger = logging.getLogger(__name__)
17
 
18
+ """
19
+ router
20
+ """
21
  def include_routers(app):
22
  package_dir = "/home/user/app/routers"
23
  if not os.path.exists(package_dir):
 
69
  text = event["message"]["text"]
70
  logger.info("------------------------------------------")
71
  logger.info(f"User ID: {user_id}, Text: {text}")
72
+ test_set_lide(text,"a1")
73
  no_process_file(text, "ai")
74
 
75
 
 
83
  title = text[:10]
84
  user_id_with_timestamp = f"{now}_{title}_{user_id}"
85
  no_process_file(text, user_id_with_timestamp)
86
+ test_set_lide(text, user_id_with_timestamp)
87
 
88
  logger.info("Received Headers: %s", received_headers)
89
  logger.info("Received Body: %s", body.decode("utf-8"))