Last active
February 10, 2021 10:21
-
-
Save herzzanu/298df3e8ecda06e0fd8abb76b000f209 to your computer and use it in GitHub Desktop.
Mirage config - using factories
This file contains hidden or 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
| // mirage/config.js - Mocking data using factories | |
| this.post('/multi_transfers', function (schema, request) { | |
| return server.create('multi-transfer', { | |
| status: 'pending', | |
| total_amount: 500, | |
| transfers: [ | |
| { | |
| amount: 300, | |
| iban: 'FR3902854000000000000000024', | |
| bic: 'BNPDFRP1', | |
| name: 'Jane Doe', | |
| }, | |
| { | |
| amount: 200, | |
| iban: 'FR1408672000000000000000167', | |
| bic: 'BNPDFRP1', | |
| name: 'John Doe', | |
| }, | |
| ], | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment