refactor: уникальные имена функций-обработчиков
handle() → run_sql() (sql_runner.py, entrypoint: sql_runner.run_sql) handle() → crud() (notes_crud.py, entrypoint: notes_crud.crud) handle() → list_notes() (notes_list.py, entrypoint: notes_list.list_notes)
This commit is contained in:
@@ -17,7 +17,7 @@ import psycopg2
|
||||
import psycopg2.extras
|
||||
|
||||
|
||||
def handle(event):
|
||||
def crud(event):
|
||||
dsn = os.environ['PG_DSN']
|
||||
# sub-path без ведущего слэша: "add", "update", "delete"
|
||||
action = event.get('_path', '/').strip('/')
|
||||
|
||||
Reference in New Issue
Block a user