This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
-
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.
Adding some fixtures to define the endpoint, refs #2
- Loading branch information
Genar Trias Ortiz
committed
Dec 5, 2017
1 parent
75ca2b2
commit 5a5c513
Showing
5 changed files
with
61 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"success" : true, | ||
"message" : "", | ||
"result" : [{ | ||
"Currency" : "DOGE", | ||
"Balance" : 0.00000000, | ||
"Available" : 0.00000000, | ||
"Pending" : 0.00000000, | ||
"CryptoAddress" : "DLxcEt3AatMyr2NTatzjsfHNoB9NT62HiF", | ||
"Requested" : false, | ||
"Uuid" : null | ||
|
||
}, { | ||
"Currency" : "BTC", | ||
"Balance" : 14.21549076, | ||
"Available" : 14.21549076, | ||
"Pending" : 0.00000000, | ||
"CryptoAddress" : "1Mrcdr6715hjda34pdXuLqXcju6qgwHA31", | ||
"Requested" : false, | ||
"Uuid" : null | ||
} | ||
] | ||
} |
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 |
---|---|---|
|
@@ -29,5 +29,9 @@ | |
"event": { | ||
"dataSource": "db", | ||
"public": true | ||
}, | ||
"balance": { | ||
"dataSource": null, | ||
"public": true | ||
} | ||
} |
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,12 @@ | ||
import fixtures from '../fixtures/balances.json' | ||
|
||
module.exports = function (Balance) { | ||
Balance.getBalances = (cb) => { | ||
cb(null, fixtures) | ||
} | ||
|
||
Balance.remoteMethod('getBalances', { | ||
http: { verb: 'get', path: '/' }, | ||
returns: {type: 'array', root: true} | ||
}) | ||
} |
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,14 @@ | ||
{ | ||
"name": "balance", | ||
"plural": "balances", | ||
"base": "Model", | ||
"idInjection": true, | ||
"options": { | ||
"validateUpsert": true | ||
}, | ||
"properties": {}, | ||
"validations": [], | ||
"relations": {}, | ||
"acls": [], | ||
"methods": {} | ||
} |
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