diff --git a/www/js/services/bma-services.js b/www/js/services/bma-services.js index 1572a103d177ed30b126b393dc18a0eb20bb58a3..83857770147602cec64f57b7962118a3cc41e966 100644 --- a/www/js/services/bma-services.js +++ b/www/js/services/bma-services.js @@ -20,7 +20,6 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. OUTPUT_OBJ = 'OBJ\\(([0-9]+)\\)', OUTPUT_OBJ_OPERATOR = OUTPUT_OBJ + '[ ]*' + OUTPUT_OPERATOR + '[ ]*' + OUTPUT_OBJ, REGEX_ENDPOINT_PARAMS = "( ([a-z_][a-z0-9-_.ÄŸÄž]*))?( ([0-9.]+))?( ([0-9a-f:]+))?( ([0-9]+))( (.+))?", - BLOCK_ATTRIBUTES= ["currency", "issuer", "medianTime", "number", "version", "powMin", "dividend", "membersCount", "hash", "identities", "joiners", "actives", "leavers", "revoked", "excluded", "certifications", "transactions", "unitbase"], regexp = { USER_ID: "[A-Za-z0-9_-]+", CURRENCY: "[A-Za-z0-9_-]+", @@ -60,8 +59,7 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. LIMIT_REQUEST_COUNT: 5, // simultaneous async request to a Duniter node LIMIT_REQUEST_DELAY: 1000, // time (in second) to wait between to call of a rest request regex: regexp, // deprecated - regexp: regexp, - BLOCK_QUERY_PARAMS: "?_source=" + BLOCK_ATTRIBUTES.join(',') + regexp: regexp }, listeners, that = this; @@ -413,9 +411,9 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. }, blockchain: { parameters: get('/blockchain/parameters', csHttp.cache.LONG), - block: get('/blockchain/block/:block' + constants.BLOCK_QUERY_PARAMS, csHttp.cache.SHORT), - blocksSlice: get('/blockchain/blocks/:count/:from' + constants.BLOCK_QUERY_PARAMS), - current: get('/blockchain/current' + constants.BLOCK_QUERY_PARAMS), + block: get('/blockchain/block/:block', csHttp.cache.SHORT), + blocksSlice: get('/blockchain/blocks/:count/:from'), + current: get('/blockchain/current'), membership: post('/blockchain/membership'), stats: { ud: get('/blockchain/with/ud', csHttp.cache.SHORT),