ledger
This commit is contained in:
@ -88,4 +88,26 @@
|
||||
$ref: '#/components/schemas/tenant_with_saldo'
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
/v1/accounts/bydescription/{description}:
|
||||
get:
|
||||
tags: [ "account" ]
|
||||
summary: Return the normalized account with given description
|
||||
operationId: additional_methods.get_account_by_description
|
||||
parameters:
|
||||
- name: description
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: account response
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/account'
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
|
||||
|
@ -43,3 +43,14 @@ def get_tenant_with_saldo(user, token_info):
|
||||
"params": ()
|
||||
}
|
||||
)
|
||||
|
||||
def get_account_by_description(user, token_info, description=None):
|
||||
return dbGetOne(user, token_info, {
|
||||
"statement": """
|
||||
SELECT a.id ,a.description
|
||||
FROM account_t a
|
||||
WHERE a.description = %s""",
|
||||
"params": (description, )
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -1509,6 +1509,28 @@ paths:
|
||||
$ref: '#/components/schemas/tenant_with_saldo'
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
/v1/accounts/bydescription/{description}:
|
||||
get:
|
||||
tags: [ "account" ]
|
||||
summary: Return the normalized account with given description
|
||||
operationId: additional_methods.get_account_by_description
|
||||
parameters:
|
||||
- name: description
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: account response
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/account'
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
|
||||
|
||||
components:
|
||||
|
Reference in New Issue
Block a user