Subversion Repositories SmartDukaan

Rev

Rev 14427 | Rev 14725 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14427 Rev 14671
Line 147... Line 147...
147
            resp.body = json.dumps(result, encoding='utf-8')
147
            resp.body = json.dumps(result, encoding='utf-8')
148
        except ValueError:
148
        except ValueError:
149
            raise falcon.HTTPError(falcon.HTTP_400,
149
            raise falcon.HTTPError(falcon.HTTP_400,
150
                'Malformed JSON',
150
                'Malformed JSON',
151
                'Could not decode the request body. The '
151
                'Could not decode the request body. The '
-
 
152
                'JSON was incorrect.')
-
 
153
        
-
 
154
class PendingCashBacks():
-
 
155
    def on_get(self, req, resp,userId):
-
 
156
        try:
-
 
157
            result = Mongo.getPendingCashbacks(int(userId))
-
 
158
            resp.body = json.dumps(result, encoding='utf-8')
-
 
159
        except ValueError:
-
 
160
            raise falcon.HTTPError(falcon.HTTP_400,
-
 
161
                'Malformed JSON',
-
 
162
                'Could not decode the request body. The '
152
                'JSON was incorrect.')
163
                'JSON was incorrect.')
153
164