remove showEmail form model, args and resolver

This commit is contained in:
Moriz Wahl 2022-03-10 18:31:15 +01:00
parent 681f27d4b0
commit 55455d0236
3 changed files with 1 additions and 6 deletions

View File

@ -8,7 +8,4 @@ export default class TransactionLinkArgs {
@Field(() => String)
memo: string
@Field(() => Boolean, { nullable: true })
showEmail?: boolean
}

View File

@ -14,7 +14,6 @@ export class TransactionLink {
this.code = transactionLink.code
this.createdAt = transactionLink.createdAt
this.validUntil = transactionLink.validUntil
this.showEmail = transactionLink.showEmail
this.deletedAt = transactionLink.deletedAt
this.redeemedAt = transactionLink.redeemedAt
this.redeemedBy = redeemedBy

View File

@ -35,7 +35,7 @@ export class TransactionLinkResolver {
@Authorized([RIGHTS.CREATE_TRANSACTION_LINK])
@Mutation(() => TransactionLink)
async createTransactionLink(
@Args() { amount, memo, showEmail = false }: TransactionLinkArgs,
@Args() { amount, memo }: TransactionLinkArgs,
@Ctx() context: any,
): Promise<TransactionLink> {
const userRepository = getCustomRepository(UserRepository)
@ -60,7 +60,6 @@ export class TransactionLinkResolver {
transactionLink.code = transactionLinkCode(createdDate)
transactionLink.createdAt = createdDate
transactionLink.validUntil = validUntil
transactionLink.showEmail = showEmail
await dbTransactionLink.save(transactionLink).catch(() => {
throw new Error('Unable to save transaction link')
})