UNPKG

flosight-ui

Version:

An open-source frontend for the Flosight API. The Flosight API provides you with a convenient, powerful and simple way to query and broadcast data on the florincoin network and build your own services with it.

40 lines (38 loc) 906 B
'use strict'; angular.module('flosight.transactions') .factory('Transaction', function($resource, Api) { return $resource(Api.apiPrefix + '/tx/:txId', { txId: '@txId' }, { get: { method: 'GET', interceptor: { response: function (res) { return res.data; }, responseError: function (res) { if (res.status === 404) { return res; } } } } }); }) .factory('TransactionsByBlock', function($resource, Api) { return $resource(Api.apiPrefix + '/txs', { block: '@block' }); }) .factory('TransactionsByAddress', function($resource, Api) { return $resource(Api.apiPrefix + '/txs', { address: '@address' }); }) .factory('Transactions', function($resource, Api) { return $resource(Api.apiPrefix + '/txs'); });