Initial commit
This commit is contained in:
14
database/pinpad.py
Normal file
14
database/pinpad.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from database.db import get_connection
|
||||
|
||||
|
||||
def get_pinpad_error(code: str):
|
||||
"""
|
||||
Возвращает (reason, action) или None
|
||||
"""
|
||||
with get_connection() as conn:
|
||||
cur = conn.cursor()
|
||||
cur.execute(
|
||||
"SELECT reason, action FROM pinpad_errors WHERE code = ?",
|
||||
(code,)
|
||||
)
|
||||
return cur.fetchone()
|
||||
Reference in New Issue
Block a user