remove moderator ID form create pending creation mutation args

This commit is contained in:
Moriz Wahl 2022-04-27 11:03:34 +02:00
parent ad8de559aa
commit 2aa7772d20
3 changed files with 2 additions and 25 deletions

View File

@ -24,12 +24,6 @@ const mocks = {
}, },
$store: { $store: {
commit: stateCommitMock, commit: stateCommitMock,
state: {
moderator: {
id: 0,
name: 'test moderator',
},
},
}, },
} }
@ -122,7 +116,6 @@ describe('CreationFormular', () => {
creationDate: getCreationDate(2), creationDate: getCreationDate(2),
amount: 90, amount: 90,
memo: 'Test create coins', memo: 'Test create coins',
moderator: 0,
}, },
}), }),
) )
@ -370,14 +363,12 @@ describe('CreationFormular', () => {
creationDate: getCreationDate(1), creationDate: getCreationDate(1),
amount: 200, amount: 200,
memo: 'Test mass create coins', memo: 'Test mass create coins',
moderator: 0,
}, },
{ {
email: 'bibi@bloxberg.de', email: 'bibi@bloxberg.de',
creationDate: getCreationDate(1), creationDate: getCreationDate(1),
amount: 200, amount: 200,
memo: 'Test mass create coins', memo: 'Test mass create coins',
moderator: 0,
}, },
], ],
}, },

View File

@ -154,7 +154,6 @@ export default {
creationDate: this.selected.date, creationDate: this.selected.date,
amount: Number(this.value), amount: Number(this.value),
memo: this.text, memo: this.text,
moderator: Number(this.$store.state.moderator.id),
}) })
}) })
this.$apollo this.$apollo
@ -188,7 +187,6 @@ export default {
creationDate: this.selected.date, creationDate: this.selected.date,
amount: Number(this.value), amount: Number(this.value),
memo: this.text, memo: this.text,
moderator: Number(this.$store.state.moderator.id),
} }
this.$apollo this.$apollo
.mutate({ .mutate({

View File

@ -1,19 +1,7 @@
import gql from 'graphql-tag' import gql from 'graphql-tag'
export const createPendingCreation = gql` export const createPendingCreation = gql`
mutation ( mutation ($email: String!, $amount: Decimal!, $memo: String!, $creationDate: String!) {
$email: String! createPendingCreation(email: $email, amount: $amount, memo: $memo, creationDate: $creationDate)
$amount: Decimal!
$memo: String!
$creationDate: String!
$moderator: Int!
) {
createPendingCreation(
email: $email
amount: $amount
memo: $memo
creationDate: $creationDate
moderator: $moderator
)
} }
` `