From d59d3649f51ffab3beb86cd29f0f6c28d9c7226d Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Thu, 25 May 2017 22:48:19 +0200 Subject: [PATCH] Rename balance to income. --- accountant/views/accounts.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/accountant/views/accounts.py b/accountant/views/accounts.py index 2719fe9..5a20b95 100644 --- a/accountant/views/accounts.py +++ b/accountant/views/accounts.py @@ -43,16 +43,16 @@ balances_model = ns.model('Account balances', { }) # Account balance model. -balance_model = ns.model('Balance', { +income_model = ns.model('Income', { 'expenses': fields.Float( readonly=True, description='Total amount of expenses'), 'revenues': fields.Float( readonly=True, description='Total amount of revenues'), - 'balance': fields.Float( + 'income': fields.Float( readonly=True, - description='Balance'), + description='Income'), }) # Category with expenses and revenues. @@ -273,14 +273,14 @@ class BalancesResource(Resource): ), 200 -@ns.route('//balance') +@ns.route('//income') @ns.doc( security='apikey', params={ 'account_id': 'Id of the account to manage' }, responses={ - 200: ('OK', balance_model), + 200: ('OK', income_model), 401: 'Unauthorized', 404: 'Account not found' }) @@ -288,10 +288,10 @@ class BalanceResource(Resource): """Resource to expose balances.""" @ns.expect(range_parser) - @ns.marshal_with(balance_model) + @ns.marshal_with(income_model) @jwt_required def get(self, account_id): - """Get account balance for a specific date range.""" + """Get account income for a specific date range.""" account = Account.query().get(account_id)