Subversion Repositories SmartDukaan

Rev

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

Rev 13799 Rev 13802
Line 117... Line 117...
117
    def on_get(self,req, resp, userId):
117
    def on_get(self,req, resp, userId):
118
        categoryId = req.get_param_as_int("categoryId")
118
        categoryId = req.get_param_as_int("categoryId")
119
        offset = req.get_param_as_int("offset")
119
        offset = req.get_param_as_int("offset")
120
        limit = req.get_param_as_int("limit")
120
        limit = req.get_param_as_int("limit")
121
        sort = req.get_param("sort")
121
        sort = req.get_param("sort")
122
        direction = req.get_param("direction")
122
        direction = req.get_param_as_int("direction")
123
        result = Mongo.getDeals(categoryId, offset, limit, sort, direction)
123
        result = Mongo.getDeals(categoryId, offset, limit, sort, direction)
124
        json_docs = [json.dumps(doc, default=json_util.default) for doc in result]
124
        json_docs = [json.dumps(doc, default=json_util.default) for doc in result]
125
        resp.body = json.dumps(json_docs, encoding='utf-8')
125
        resp.body = json.dumps(json_docs, encoding='utf-8')
126
 
126
 
127
class MasterData():
127
class MasterData():