-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from Muzikie/add-new-modules
Sync Streamer with new changes in modules and events at blockchain
- Loading branch information
Showing
94 changed files
with
1,293 additions
and
3,018 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
services/blockchain-indexer/methods/dataService/controllers/collections.js
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
services/blockchain-indexer/methods/dataService/controllers/subscriptions.js
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
services/blockchain-indexer/methods/dataService/modules/anchor.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const { | ||
getAnchors, | ||
} = require('../controllers/anchors'); | ||
|
||
module.exports = [ | ||
{ | ||
name: 'anchors', | ||
controller: getAnchors, | ||
params: { | ||
submitter: { optional: true, type: 'string' }, | ||
anchorID: { optional: true, type: 'string' }, | ||
limit: { optional: true, type: 'number' }, | ||
offset: { optional: true, type: 'number' }, | ||
winner: { optional: true, type: 'number' }, | ||
}, | ||
}, | ||
]; |
16 changes: 0 additions & 16 deletions
16
services/blockchain-indexer/methods/dataService/modules/audio.js
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
services/blockchain-indexer/methods/dataService/modules/badge.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const { | ||
getBadges, | ||
} = require('../controllers/badges'); | ||
|
||
module.exports = [ | ||
{ | ||
name: 'badges', | ||
controller: getBadges, | ||
params: { | ||
awardedTo: { optional: true, type: 'string' }, | ||
badgeID: { optional: true, type: 'string' }, | ||
anchorID: { optional: true, type: 'string' }, | ||
type: { optional: true, type: 'string' }, | ||
limit: { optional: true, type: 'number' }, | ||
offset: { optional: true, type: 'number' }, | ||
}, | ||
}, | ||
]; |
16 changes: 0 additions & 16 deletions
16
services/blockchain-indexer/methods/dataService/modules/collection.js
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
services/blockchain-indexer/methods/dataService/modules/profile.js
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
services/blockchain-indexer/methods/dataService/modules/subscription.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const { Logger } = require('lisk-service-framework'); | ||
const util = require('util'); | ||
|
||
const logger = Logger(); | ||
|
||
const business = require('./business'); | ||
|
||
const getAnchors = async params => { | ||
// Store logs | ||
if (params.anchorID) logger.debug(`Retrieved anchor with ID ${params.anchorID} from Lisk Core`); | ||
else if (params.submitter) logger.debug(`Retrieved anchor with submitter: ${params.submitter} from Lisk Core`); | ||
else if (params.winner) logger.debug('Retrieved winner anchors from Lisk Core'); | ||
else logger.debug(`Retrieved anchors with custom search: ${util.inspect(params)} from Lisk Core`); | ||
|
||
// Get data from server | ||
const response = await business.getAnchors(params); | ||
|
||
return response; | ||
}; | ||
|
||
module.exports = { | ||
getAnchors, | ||
}; |
Oops, something went wrong.