Subversion Repositories SmartDukaan

Rev

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

Rev 14671 Rev 14725
Line 117... Line 117...
117
class Transactions():
117
class Transactions():
118
    def on_get(self, req, resp):
118
    def on_get(self, req, resp):
119
        try:
119
        try:
120
            page = req.get_param_as_int("page")
120
            page = req.get_param_as_int("page")
121
            window = req.get_param_as_int("window")
121
            window = req.get_param_as_int("window")
-
 
122
            user = req.get_param("user")
-
 
123
            status = req.get_param("status")
-
 
124
            if user == "" :
-
 
125
                user = None
-
 
126
            if status == "" :
-
 
127
                status = None
122
            result = Mysql.getOrders(page, window)
128
            result = Mysql.getOrders(page, window,status,user)
123
            resp.body = result
129
            resp.body = result
124
            resp.content_type = 'text/html'
130
            resp.content_type = 'text/html'
125
        except ValueError:
131
        except ValueError:
126
            raise falcon.HTTPError(falcon.HTTP_400,
132
            raise falcon.HTTPError(falcon.HTTP_400,
127
                'Malformed JSON',
133
                'Malformed JSON',