Skip to content

Instantly share code, notes, and snippets.

@herzzanu
Last active February 10, 2021 10:18
Show Gist options
  • Save herzzanu/291790d2e2c896b698a4d927ede92fe5 to your computer and use it in GitHub Desktop.
Save herzzanu/291790d2e2c896b698a4d927ede92fe5 to your computer and use it in GitHub Desktop.
Mirage config - using fixtures
// mirage/config.js - Mocking data using fixtures
this.post('/multi_transfers', {
multi_transfer: {
id: '5f6d9775-2160-4568-8ce2-2083db593753',
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