locale stuff
This commit is contained in:
@ -49,3 +49,27 @@
|
||||
$ref: '#/components/schemas/fee'
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
/v1/account/saldo/{accountId}:
|
||||
get:
|
||||
tags: [ "account" ]
|
||||
summary: Return saldo of the account
|
||||
operationId: additional_methods.get_account_saldo
|
||||
parameters:
|
||||
- name: accountId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: get_account_saldo
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
saldo:
|
||||
type: number
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
|
||||
|
@ -25,3 +25,10 @@ SELECT o.id, o.description, o.amount, o.fee_type, o.startdate, o.enddate
|
||||
"params": (tenancyId, )
|
||||
}
|
||||
)
|
||||
|
||||
def get_account_saldo(user, token_info, accountId=None):
|
||||
return dbGetOne(user, token_info, {
|
||||
"statement": "SELECT sum(amount) as saldo FROM account_entry_t WHERE account=%s",
|
||||
"params": (accountId, )
|
||||
}
|
||||
)
|
@ -1244,6 +1244,8 @@ SELECT
|
||||
,created_at
|
||||
,amount
|
||||
FROM account_entry_t
|
||||
ORDER BY
|
||||
amount
|
||||
""",
|
||||
"params": ()
|
||||
}
|
||||
|
@ -1308,6 +1308,30 @@ paths:
|
||||
$ref: '#/components/schemas/fee'
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
/v1/account/saldo/{accountId}:
|
||||
get:
|
||||
tags: [ "account" ]
|
||||
summary: Return saldo of the account
|
||||
operationId: additional_methods.get_account_saldo
|
||||
parameters:
|
||||
- name: accountId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: get_account_saldo
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
saldo:
|
||||
type: number
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
|
||||
|
||||
components:
|
||||
securitySchemes:
|
||||
|
Reference in New Issue
Block a user