Subversion Repositories SmartDukaan

Rev

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

Rev 17730 Rev 17928
Line 1580... Line 1580...
1580
class FetchUser:
1580
class FetchUser:
1581
    def on_get(self,req,resp):
1581
    def on_get(self,req,resp):
1582
        user_id = req.get_param_as_int("user_id")
1582
        user_id = req.get_param_as_int("user_id")
1583
        result = Mongo.getDummyUser(user_id)
1583
        result = Mongo.getDummyUser(user_id)
1584
        resp.body = json.dumps(result, encoding='utf-8')
1584
        resp.body = json.dumps(result, encoding='utf-8')
-
 
1585
 
-
 
1586
class SearchSubCategory:
-
 
1587
    def on_get(self,req, resp):
-
 
1588
        subCategoryId = req.get_param_as_int("subCategoryId")
-
 
1589
        searchTerm = req.get_param("searchTerm")
-
 
1590
        offset = req.get_param_as_int("offset")
-
 
1591
        limit = req.get_param_as_int("limit")
-
 
1592
        
-
 
1593
        result = Mongo.getDealsForSearchText(subCategoryId, searchTerm,offset, limit)
-
 
1594
        resp.body = json.dumps(result, encoding='utf-8')
-
 
1595
 
-
 
1596
class SearchSubCategoryCount:
-
 
1597
    def on_get(self,req, resp):
-
 
1598
        subCategoryId = req.get_param_as_int("subCategoryId")
-
 
1599
        searchTerm = req.get_param("searchTerm")
-
 
1600
        result = Mongo.getCountForSearchText(subCategoryId, searchTerm)
-
 
1601
        resp.body = json.dumps(result, encoding='utf-8')
-
 
1602
 
1585
        
1603
        
1586
    
1604
    
1587
 
1605
 
1588
    
1606
    
1589
    
1607