From 9d674f82cadd45a0215ab4e11380b159a6f199b5 Mon Sep 17 00:00:00 2001 From: seba Date: Thu, 29 Sep 2011 23:41:48 +0200 Subject: [PATCH] api functional! (except for authblobbusiness) --- k4ever/api2/handlers.py | 3 ++- k4ever/api2/urls.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/k4ever/api2/handlers.py b/k4ever/api2/handlers.py index 9a79411..1113168 100644 --- a/k4ever/api2/handlers.py +++ b/k4ever/api2/handlers.py @@ -121,7 +121,8 @@ class TransactionTypeHandler(BaseHandler): class AccountBalanceHandler(BaseHandler): allowed_methods = ('GET',) def read(self, request): - pass + balance = request.user.get_profile().balance + return {'balance': balance} class AuthBlobHandler(BaseHandler): # allowed_methods = ('GET', 'POST') diff --git a/k4ever/api2/urls.py b/k4ever/api2/urls.py index 61555e6..404f9df 100644 --- a/k4ever/api2/urls.py +++ b/k4ever/api2/urls.py @@ -35,7 +35,7 @@ urlpatterns = patterns('', url(r'account/transactions/transact/$', transactionTransactRes), url(r'account/transfers/transfer/$', transactionTransactRes), url(r'account/transactions/types/$', transactionTypeRes), - url(r'account/transfer/types/$', transactionTypeRes), + url(r'account/transfers/types/$', transactionTypeRes), url(r'account/balance/$', accountBalanceRes), url(r'auth/blob/$', authBlobRes),