UNPKG

insight-ui-mangacoin

Version:

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

40 lines (38 loc) 905 B
'use strict'; angular.module('insight.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'); });