forked from witnet/data-feeds-explorer
-
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.
- Loading branch information
Showing
36 changed files
with
716 additions
and
884 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
module.exports = { | ||
async up (db) { | ||
async up(db) { | ||
const resultRequestCollection = db.collection('result_request') | ||
await Promise.all( | ||
(await resultRequestCollection.find({ feedFullName: /boba-/ }).toArray()) | ||
.map(resultRequest => ({ | ||
.map((resultRequest) => ({ | ||
...resultRequest, | ||
feedFullName: resultRequest.feedFullName.replace( | ||
/boba-/, | ||
'boba-ethereum-' | ||
) | ||
'boba-ethereum-', | ||
), | ||
})) | ||
.map(resultRequest => | ||
.map((resultRequest) => | ||
resultRequestCollection.updateOne( | ||
{ _id: resultRequest._id }, | ||
{ $set: { feedFullName: resultRequest.feedFullName } } | ||
) | ||
) | ||
{ $set: { feedFullName: resultRequest.feedFullName } }, | ||
), | ||
), | ||
) | ||
} | ||
}, | ||
} |
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 |
---|---|---|
@@ -1,44 +1,44 @@ | ||
module.exports = { | ||
async up (db) { | ||
async up(db) { | ||
const resultRequestCollection = db.collection('result_request') | ||
const updateConfluxTethysPromises = ( | ||
await resultRequestCollection | ||
.find({ feedFullName: /conflux-tethys/ }) | ||
.toArray() | ||
) | ||
.map(resultRequest => ({ | ||
.map((resultRequest) => ({ | ||
...resultRequest, | ||
feedFullName: resultRequest.feedFullName.replace( | ||
/conflux-tethys/, | ||
'conflux-core-mainnet' | ||
) | ||
'conflux-core-mainnet', | ||
), | ||
})) | ||
.map(resultRequest => | ||
.map((resultRequest) => | ||
resultRequestCollection.updateOne( | ||
{ _id: resultRequest._id }, | ||
{ $set: { feedFullName: resultRequest.feedFullName } } | ||
) | ||
{ $set: { feedFullName: resultRequest.feedFullName } }, | ||
), | ||
) | ||
const updateConfluxRinkebyPromises = ( | ||
await resultRequestCollection.find({ | ||
feedFullName: /conflux-testnet/ | ||
feedFullName: /conflux-testnet/, | ||
}) | ||
) | ||
.map(resultRequest => ({ | ||
.map((resultRequest) => ({ | ||
...resultRequest, | ||
feedFullName: resultRequest.feedFullName.replace( | ||
/conflux-testnet/, | ||
'conflux-core-testnet' | ||
) | ||
'conflux-core-testnet', | ||
), | ||
})) | ||
.map(resultRequest => | ||
.map((resultRequest) => | ||
resultRequestCollection.updateOne( | ||
{ _id: resultRequest._id }, | ||
{ $set: { feedFullName: resultRequest.feedFullName } } | ||
) | ||
{ $set: { feedFullName: resultRequest.feedFullName } }, | ||
), | ||
) | ||
await Promise.all( | ||
[updateConfluxTethysPromises, updateConfluxRinkebyPromises].flat() | ||
[updateConfluxTethysPromises, updateConfluxRinkebyPromises].flat(), | ||
) | ||
} | ||
}, | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
# Data Feeds Explorer Api | ||
# Data Feeds Explorer Api |
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
Oops, something went wrong.