hv2-api/account.py

9 lines
365 B
Python

from db import dbGetMany, dbGetOne
def getAccounts(user, token_info):
return dbGetMany(user, token_info, {"statement": "SELECT id, description FROM account_t", "params": ()})
def getAccount(user, token_info, accountId=None):
return dbGetOne(user, token_info, {"statement": "select id, description from account_t where id = %s", "params": (accountId, )})