Skip to content

Commit

Permalink
Add destinationAccount as query param (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristinfritsch authored Jul 1, 2020
1 parent 1839319 commit 58ff53e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/payoutsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,23 @@ function getInstance() {

/**
* Get payouts
* @param {String} destinationAccount
* @param {String} from
* @param {String} to
* @param {String} pageBefore
* @param {String} pageAfter
* @param {String} pageSize
*/
function getPayouts(
destinationAccount: string,
from: string,
to: string,
pageBefore: string,
pageAfter: string,
pageSize: string
) {
const queryParams = {
destinationAccount: nullIfEmpty(destinationAccount),
from: nullIfEmpty(from),
to: nullIfEmpty(to),
pageBefore: nullIfEmpty(pageBefore),
Expand Down
6 changes: 6 additions & 0 deletions pages/debug/payouts/fetch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<v-col cols="12" md="4">
<v-form>
<header>Optional filter params:</header>
<v-text-field
v-model="formData.destinationAccount"
label="Destination Account"
/>
<v-text-field v-model="formData.from" label="From" />
<v-text-field v-model="formData.to" label="To" />
<v-text-field v-model="formData.pageSize" label="PageSize" />
Expand Down Expand Up @@ -56,6 +60,7 @@ import ErrorSheet from '@/components/ErrorSheet.vue'
export default class FetchPayoutsClass extends Vue {
// data
formData = {
destinationAccount: '',
from: '',
to: '',
pageSize: '',
Expand All @@ -82,6 +87,7 @@ export default class FetchPayoutsClass extends Vue {
this.loading = true
try {
await this.$payoutsApi.getPayouts(
this.formData.destinationAccount,
this.formData.from,
this.formData.to,
this.formData.pageBefore,
Expand Down

0 comments on commit 58ff53e

Please sign in to comment.