Subversion Repositories SmartDukaan

Rev

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

Rev 13868 Rev 13872
Line 45... Line 45...
45
    
45
    
46
    def on_get(self, req, resp):
46
    def on_get(self, req, resp):
47
        try:
47
        try:
48
            userId = req.get_param_as_int("userId")
48
            userId = req.get_param_as_int("userId")
49
            storeId = req.get_param_as_int("storeId")
49
            storeId = req.get_param_as_int("storeId")
50
            store = main.getStore(storeId)
50
            result = main.getStore(storeId).getTrackingUrls(userId)
51
            return store.getTrackingUrls(userId)
51
            return json.dumps({'result':result}, encoding='utf-8')
52
        except ValueError:
52
        except ValueError:
53
            raise falcon.HTTPError(falcon.HTTP_400,
53
            raise falcon.HTTPError(falcon.HTTP_400,
54
                'Malformed JSON',
54
                'Malformed JSON',
55
                'Could not decode the request body. The '
55
                'Could not decode the request body. The '
56
                'JSON was incorrect.')
56
                'JSON was incorrect.')